732c9c9c1a14e3ae645695191b6dca369f8d2b06.svn-base 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef __N76_COMMON_H__
  2. #define __N76_COMMON_H__
  3. #ifdef N76E003_IAR
  4. #include "N76E003_iar.h"
  5. #else
  6. #include "N76E003.h"
  7. #endif
  8. #include "SFR_Macro.h"
  9. #include "Function_define.h"
  10. //#include "TypeDef.h"
  11. typedef bit BIT;
  12. typedef unsigned char UINT8;
  13. typedef unsigned int UINT16;
  14. typedef unsigned long UINT32;
  15. typedef unsigned char uint8_t;
  16. typedef unsigned int uint16_t;
  17. typedef unsigned long uint32_t;
  18. typedef unsigned char uint8;
  19. typedef unsigned int uint16;
  20. typedef unsigned long uint32;
  21. typedef signed char int8;
  22. typedef signed int int16;
  23. typedef signed long int32;
  24. typedef unsigned char u8;
  25. typedef unsigned int u16;
  26. typedef unsigned long u32;
  27. #define DBG printf
  28. #define THIS_VER "V1.0"
  29. #define CID_READ 0x0B
  30. #define DID_READ 0x0C
  31. #define ERASE_APROM 0x22
  32. #define READ_APROM 0x00
  33. #define PROGRAM_APROM 0x21
  34. #define ERASE_LDROM
  35. #define READ_LDROM
  36. #define PROGRAM_LDROM
  37. #define READ_CFG 0xC0
  38. #define PROGRAM_CFG 0xE1
  39. #define READ_UID 0x04
  40. void InitialUART0_Timer1 ( uint32 u32Baudrate ); //T1M = 1, SMOD = 1
  41. void InitialUART0_Timer3 ( uint32 u32Baudrate ); //Timer3 as Baudrate, SMOD=1, Prescale=0
  42. void InitialUART1_Timer3 ( uint32 u32Baudrate );
  43. void Send_Data_To_UART0 ( uint8 c );
  44. uint8 Receive_Data_From_UART0 ( void );
  45. void Send_Data_To_UART1 ( uint8 c );
  46. uint8 Receive_Data_From_UART1 ( void );
  47. void InitialUART1 ( uint32 u32Baudrate );
  48. #ifdef N76E003_IAR
  49. void printf_UART ( uint8 *str, ... );
  50. #endif
  51. extern uint8 BIT_TMP;
  52. #endif