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,21 @@
|
||||
#ifndef __BOARD_H
|
||||
#define __BOARD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "ch32f10x.h"
|
||||
|
||||
void board_button_init(void);
|
||||
uint8_t board_button_getstate(void);
|
||||
void board_led_init(void);
|
||||
void board_led_toggle(void);
|
||||
void board_led_set(uint8_t set);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : ch32f10x_conf.h
|
||||
* Author : WCH
|
||||
* Version : V1.0.0
|
||||
* Date : 2019/10/15
|
||||
* Description : Library configuration file.
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*******************************************************************************/
|
||||
#ifndef __CH32F10x_CONF_H
|
||||
#define __CH32F10x_CONF_H
|
||||
|
||||
#include "ch32f10x_adc.h"
|
||||
#include "ch32f10x_bkp.h"
|
||||
#include "ch32f10x_can.h"
|
||||
#include "ch32f10x_crc.h"
|
||||
#include "ch32f10x_dac.h"
|
||||
#include "ch32f10x_dbgmcu.h"
|
||||
#include "ch32f10x_dma.h"
|
||||
#include "ch32f10x_exti.h"
|
||||
#include "ch32f10x_flash.h"
|
||||
#include "ch32f10x_gpio.h"
|
||||
#include "ch32f10x_i2c.h"
|
||||
#include "ch32f10x_iwdg.h"
|
||||
#include "ch32f10x_pwr.h"
|
||||
#include "ch32f10x_rcc.h"
|
||||
#include "ch32f10x_rtc.h"
|
||||
#include "ch32f10x_spi.h"
|
||||
#include "ch32f10x_tim.h"
|
||||
#include "ch32f10x_usart.h"
|
||||
#include "ch32f10x_wwdg.h"
|
||||
#include "ch32f10x_misc.h"
|
||||
|
||||
|
||||
#endif /* __CH32F10x_CONF_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : ch32f10x_it.h
|
||||
* Author : WCH
|
||||
* Version : V1.0.0
|
||||
* Date : 2019/10/15
|
||||
* Description : This file contains the headers of the interrupt handlers.
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*******************************************************************************/
|
||||
#ifndef __CH32F10x_IT_H
|
||||
#define __CH32F10x_IT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ch32f10x.h"
|
||||
|
||||
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 );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CH32F10x_IT_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : system_ch32f10x.h
|
||||
* Author : WCH
|
||||
* Version : V1.0.0
|
||||
* Date : 2019/10/15
|
||||
* Description : CMSIS Cortex-M3 Device Peripheral Access Layer System Header File.
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*******************************************************************************/
|
||||
#ifndef __SYSTEM_CH32F10x_H
|
||||
#define __SYSTEM_CH32F10x_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern unsigned int SystemCoreClock; /* System Clock Frequency (Core Clock) */
|
||||
|
||||
/* CH32F10x_System_Exported_Functions */
|
||||
extern void SystemInit( void );
|
||||
extern void SystemCoreClockUpdate( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__CH32F10x_SYSTEM_H */
|
||||
|
||||
|
||||
|
||||
@@ -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