c51c1f228a66ed27945cf78a11ef99a10d2ecf84.svn-base 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 signed char int8;
  20. typedef unsigned int uint16;
  21. typedef signed int int16;
  22. typedef unsigned long uint32;
  23. typedef signed long int32;
  24. #define DBG printf
  25. #define THIS_VER "V1.0"
  26. #define CID_READ 0x0B
  27. #define DID_READ 0x0C
  28. #define ERASE_APROM 0x22
  29. #define READ_APROM 0x00
  30. #define PROGRAM_APROM 0x21
  31. #define ERASE_LDROM
  32. #define READ_LDROM
  33. #define PROGRAM_LDROM
  34. #define READ_CFG 0xC0
  35. #define PROGRAM_CFG 0xE1
  36. #define READ_UID 0x04
  37. void InitialUART0_Timer1 ( uint32 u32Baudrate ); //T1M = 1, SMOD = 1
  38. void InitialUART0_Timer3 ( uint32 u32Baudrate ); //Timer3 as Baudrate, SMOD=1, Prescale=0
  39. void InitialUART1_Timer3 ( uint32 u32Baudrate );
  40. void Send_Data_To_UART0 ( uint8 c );
  41. uint8 Receive_Data_From_UART0 ( void );
  42. void Send_Data_To_UART1 ( uint8 c );
  43. uint8 Receive_Data_From_UART1 ( void );
  44. void InitialUART1 ( uint32 u32Baudrate );
  45. #ifdef N76E003_IAR
  46. void printf_UART ( uint8 *str, ... );
  47. #endif
  48. extern uint8 BIT_TMP;
  49. #endif