Common.h 1013 B

1234567891011121314151617181920212223242526272829303132333435
  1. typedef unsigned char UINT8;
  2. typedef unsigned int UINT16;
  3. typedef unsigned long UINT32;
  4. typedef unsigned char uint8_t;
  5. typedef unsigned int uint16_t;
  6. typedef unsigned long uint32_t;
  7. #define CID_READ 0x0B
  8. #define DID_READ 0x0C
  9. #define ERASE_APROM 0x22
  10. #define READ_APROM 0x00
  11. #define PROGRAM_APROM 0x21
  12. #define ERASE_LDROM
  13. #define READ_LDROM
  14. #define PROGRAM_LDROM
  15. #define READ_CFG 0xC0
  16. #define PROGRAM_CFG 0xE1
  17. #define READ_UID 0x04
  18. void InitialUART0_Timer1(UINT32 u32Baudrate); //T1M = 1, SMOD = 1
  19. void InitialUART0_Timer3(UINT32 u32Baudrate); //Timer3 as Baudrate, SMOD=1, Prescale=0
  20. void InitialUART1_Timer3(UINT32 u32Baudrate);
  21. void Send_Data_To_UART0(UINT8 c);
  22. UINT8 Receive_Data_From_UART0(void);
  23. void Send_Data_To_UART1(UINT8 c);
  24. UINT8 Receive_Data_From_UART1(void);
  25. void InitialUART1(UINT32 u32Baudrate);
  26. void printf_UART(uint8_t *str, ...);
  27. extern UINT8 BIT_TMP;