Initialer Commit
This commit is contained in:
commit
945d2870aa
17 changed files with 3370 additions and 0 deletions
35
include/nuvoton/Common.h
Normal file
35
include/nuvoton/Common.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
|
||||
typedef unsigned char UINT8;
|
||||
typedef unsigned int UINT16;
|
||||
typedef unsigned long UINT32;
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned int uint16_t;
|
||||
typedef unsigned long uint32_t;
|
||||
|
||||
|
||||
|
||||
|
||||
#define CID_READ 0x0B
|
||||
#define DID_READ 0x0C
|
||||
|
||||
#define ERASE_APROM 0x22
|
||||
#define READ_APROM 0x00
|
||||
#define PROGRAM_APROM 0x21
|
||||
#define ERASE_LDROM
|
||||
#define READ_LDROM
|
||||
#define PROGRAM_LDROM
|
||||
#define READ_CFG 0xC0
|
||||
#define PROGRAM_CFG 0xE1
|
||||
#define READ_UID 0x04
|
||||
|
||||
|
||||
void InitialUART0_Timer1(UINT32 u32Baudrate); //T1M = 1, SMOD = 1
|
||||
void InitialUART0_Timer3(UINT32 u32Baudrate); //Timer3 as Baudrate, SMOD=1, Prescale=0
|
||||
void InitialUART1_Timer3(UINT32 u32Baudrate);
|
||||
void Send_Data_To_UART0(UINT8 c);
|
||||
UINT8 Receive_Data_From_UART0(void);
|
||||
void Send_Data_To_UART1(UINT8 c);
|
||||
UINT8 Receive_Data_From_UART1(void);
|
||||
void InitialUART1(UINT32 u32Baudrate);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue