2021-07-10 11:17:24 +02:00
|
|
|
#ifndef _NUCLEI_SDK_HAL_H
|
|
|
|
#define _NUCLEI_SDK_HAL_H
|
|
|
|
|
2021-08-07 10:08:42 +02:00
|
|
|
#include "gd32vf103c_longan_nano.h"
|
2021-07-10 11:17:24 +02:00
|
|
|
|
2021-08-07 10:08:42 +02:00
|
|
|
// 4 bits for interrupt level, 0 for priority.
|
|
|
|
// level 0 = lowest priority, level 15 = highest priority.
|
2021-08-07 11:03:16 +02:00
|
|
|
#define __ECLIC_INTCTLBITS 4
|
2021-07-10 11:17:24 +02:00
|
|
|
|
2021-08-07 11:03:16 +02:00
|
|
|
#define __SYSTEM_CLOCK 72000000
|
|
|
|
#define HXTAL_VALUE ((uint32_t)8000000)
|
2021-08-07 10:08:42 +02:00
|
|
|
|
2021-08-07 11:03:16 +02:00
|
|
|
#define SOC_DEBUG_UART GD32_COM0
|
|
|
|
|
|
|
|
#define DBG_KEY_UNLOCK 0x4B5A6978
|
|
|
|
#define DBG_CMD_RESET 0x1
|
|
|
|
#define DBG_KEY REG32(DBG + 0x0C)
|
|
|
|
#define DBG_CMD REG32(DBG + 0x08)
|
2021-07-10 11:17:24 +02:00
|
|
|
|
|
|
|
#endif
|