mirror of
https://github.com/WeActStudio/WeActStudio.EpaperModule.git
synced 2026-08-16 13:13:45 +02:00
first commit
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
/*!
|
||||
* @file apm32f10x_int.h
|
||||
*
|
||||
* @brief This file contains the headers of the interrupt handlers
|
||||
*
|
||||
* @version V1.0.2
|
||||
*
|
||||
* @date 2022-01-05
|
||||
*
|
||||
* @attention
|
||||
*
|
||||
* Copyright (C) 2020-2022 Geehy Semiconductor
|
||||
*
|
||||
* You may not use this file except in compliance with the
|
||||
* GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
|
||||
*
|
||||
* The program is only for reference, which is distributed in the hope
|
||||
* that it will be usefull and instructional for customers to develop
|
||||
* their software. Unless required by applicable law or agreed to in
|
||||
* writing, the program is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
|
||||
* and limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __APM32F10X_INT_H
|
||||
#define __APM32F10X_INT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "apm32f10x.h"
|
||||
|
||||
/** @addtogroup Peripherals_Library Standard Peripheral Library
|
||||
@{
|
||||
*/
|
||||
|
||||
/** @addtogroup INT_Driver INT Driver
|
||||
@{
|
||||
*/
|
||||
|
||||
/** @addtogroup INT_Fuctions Fuctions
|
||||
@{
|
||||
*/
|
||||
|
||||
void NMI_Handler(void);
|
||||
void HardFault_Handler(void);
|
||||
void MemManage_Handler(void);
|
||||
void BusFault_Handler(void);
|
||||
void UsageFault_Handler(void);
|
||||
void SVC_Handler(void);
|
||||
void DebugMon_Handler(void);
|
||||
void PendSV_Handler(void);
|
||||
void SysTick_Handler(void);
|
||||
|
||||
/**@} end of group INT_Fuctions*/
|
||||
/**@} end of group INT_Driver*/
|
||||
/**@} end of group Peripherals_Library*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__APM32F10X_INT_H */
|
||||
@@ -0,0 +1,28 @@
|
||||
#ifndef __BOARD_H
|
||||
#define __BOARD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "apm32f10x.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define _value(value) #value
|
||||
#define printf_name(name) printf(_value(> #name)), printf("\r\n");
|
||||
#define printf_value(name, value) printf(_value(> #name)), printf(" "), printf(#value), printf(" :%d\r\n", value);
|
||||
|
||||
void board_usart_init(void);
|
||||
void board_led_init(void);
|
||||
void board_led_on(void);
|
||||
void board_led_off(void);
|
||||
void board_led_toggle(void);
|
||||
void board_button_init(void);
|
||||
uint8_t board_button_state_get(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
/*!
|
||||
* @file main.h
|
||||
*
|
||||
* @brief Main program body
|
||||
*
|
||||
* @version V1.0.2
|
||||
*
|
||||
* @date 2022-01-05
|
||||
*
|
||||
* @attention
|
||||
*
|
||||
* Copyright (C) 2020-2022 Geehy Semiconductor
|
||||
*
|
||||
* You may not use this file except in compliance with the
|
||||
* GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
|
||||
*
|
||||
* The program is only for reference, which is distributed in the hope
|
||||
* that it will be usefull and instructional for customers to develop
|
||||
* their software. Unless required by applicable law or agreed to in
|
||||
* writing, the program is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
|
||||
* and limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __MAIN_H
|
||||
#define __MAIN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "apm32f10x.h"
|
||||
|
||||
void Delay(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
#ifndef __SYS_TICK_H
|
||||
#define __SYS_TICK_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define SysTick_Freq (1000U) // Hz
|
||||
#define SysTick_Tick (1000U / SysTick_Freq)
|
||||
|
||||
/* configure systick */
|
||||
void systick_config(void);
|
||||
/* delay a time in milliseconds */
|
||||
void delay(uint32_t count);
|
||||
/* delay a time in milliseconds with low power */
|
||||
void delay_lp(uint32_t count);
|
||||
/* delay decrement */
|
||||
void delay_decrement(void);
|
||||
/* get system tick */
|
||||
uint32_t systick_get_tick(void);
|
||||
/* suspend system tick */
|
||||
void systick_DisableIRQ(void);
|
||||
/* resume system tick */
|
||||
void systick_EnableIRQ(void);
|
||||
|
||||
void systick_Disable(void);
|
||||
void systick_Enable(void);
|
||||
void systick_deinit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SYS_TICK_H */
|
||||
Reference in New Issue
Block a user