Files
hm fc10ef2e10 Initial commit: LSPi (LiangShanPi) project
GD32F470ZGT6 based project with full peripheral support:
- SDRAM (W9825G6KH) via EXMC
- LCD NT35510 (480x800) via EXMC NOR/PSRAM
- Flash (W25Q64) via SPI
- UART (USART0) debug console
- LED indicators
- CMSIS-DAP debug interface
- CMake + ARM GCC toolchain build system
2026-04-26 16:24:42 +08:00

43 lines
680 B
C++

#ifndef SYS_TICK_H
#define SYS_TICK_H
#include <stdint.h>
#ifdef __cplusplus
#include "common_types.h"
class SysTickTimer {
public:
static SysTickTimer &instance();
SysTickTimer(const SysTickTimer &) = delete;
SysTickTimer &operator=(const SysTickTimer &) = delete;
RetCode config();
void delay_ms(uint32_t count);
void decrement();
private:
SysTickTimer() = default;
~SysTickTimer() = default;
volatile uint32_t delay_ = 0;
};
#endif /* __cplusplus */
#ifdef __cplusplus
extern "C" {
#endif
void systick_config(void);
void delay_1ms(uint32_t count);
void delay_decrement(void);
#ifdef __cplusplus
}
#endif
#endif /* SYS_TICK_H */