#ifndef __N76_COMMON_H__ #define __N76_COMMON_H__ #ifdef N76E003_IAR #include "N76E003_iar.h" #else #include "N76E003.h" #endif #include "SFR_Macro.h" #include "Function_define.h" //#include "TypeDef.h" typedef bit BIT; 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; typedef unsigned char uint8; typedef unsigned int uint16; typedef unsigned long uint32; typedef signed char int8; typedef signed int int16; typedef signed long int32; typedef unsigned char u8; typedef unsigned int u16; typedef unsigned long u32; #define _DEBUG_ 1 #if _DEBUG_ #define DBG printf #else #define DBG #endif #define THIS_VER "V1.0" #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 Send_String_To_UART0( UINT8 *string ); void InitialUART1 ( uint32 u32Baudrate ); #ifdef N76E003_IAR void printf_UART ( uint8 *str, ... ); #endif extern uint8 BIT_TMP; #endif