Tronlong_T113i_C906_FreeRTOS/include/t113i.h

46 lines
1.0 KiB
C

#ifndef T113I_H
#define T113I_H
#include <stdint.h>
#define __PACKED __attribute__((packed))
#define __IM volatile
#define __OM const volatile
#define __IOM volatile
typedef struct {
__IOM uint32_t CFG[4]; /* 0x00 - 0x0C */
__IOM uint32_t DAT; /* 0x10 */
__IOM uint32_t DRV[4]; /* 0x14 - 0x20 */
__IOM uint32_t PULL[2]; /* 0x24 - 0x28 */
} GPIO_Type;
typedef struct {
__IOM uint32_t RBR_THR_DLL;
__IOM uint32_t DLH_IER;
__IOM uint32_t IIR_FCR;
__IOM uint32_t LCR;
__IOM uint32_t MCR;
__IOM uint32_t LSR;
__IOM uint32_t MSR;
__IOM uint32_t SCH;
} UART_Type;
#define GPIOB_BASE (0x02000030)
#define GPIOC_BASE (0x02000060)
#define GPIOD_BASE (0x02000090)
#define GPIOE_BASE (0x020000C0)
#define GPIOF_BASE (0x020000F0)
#define GPIOG_BASE (0x02000120)
#define GPIOB ((GPIO_Type *)GPIOB_BASE)
#define GPIOC ((GPIO_Type *)GPIOC_BASE)
#define GPIOD ((GPIO_Type *)GPIOD_BASE)
#define GPIOE ((GPIO_Type *)GPIOE_BASE)
#define GPIOF ((GPIO_Type *)GPIOF_BASE)
#define GPIOG ((GPIO_Type *)GPIOG_BASE)
#endif // T113I_H