Main.h
资源名称:ISP.rar [点击查看]
上传用户:cchhkk2004
上传日期:2022-05-10
资源大小:78k
文件大小:1k
源码类别:
VxWorks
开发平台:
Others
- //--------------------------------------------------------------------------------
- typedef unsigned char UINT8 ;
- typedef unsigned int UINT16 ;
- typedef unsigned int UINT32 ;
- //--------------------------------------------------------------------------------
- #define UART_BPS 115200
- /* 系统设置, Fosc、Fcclk、Fcco、Fpclk必须定义*/
- #define Fosc (11059200) //晶振频率,10MHz~25MHz,应当与实际一至
- #define Fcclk (Fosc * 6) //66.3552 系统频率,必须为Fosc的整数倍(1~32),且<=60MHZ
- #define Fcco (Fcclk * 4) //CCO频率,必须为Fcclk的2、4、8、16倍,范围为156MHz~320MHz
- #define Fpclk (Fcclk / 4) * 1 //016.5888,VPB时钟频率,只能为(Fcclk / 4)的1 ~ 4倍
- //--------------------------------------------------------------------------------
- #define USE_UART0_MSG
- typedef enum
- {
- LOW,
- HIGH
- }en_Level;
- typedef enum
- {
- INPUT,
- OUTPUT
- }en_InOut;
- enum
- {
- FALSE,
- TRUE
- };
- //--------------------------------------------------------------------------------
- void MAM_init(void);
- void PLL_Init(void);
- void Timer0_Init(void);
- void UART1_Init (void);
- void UART0_Init (void);
- UINT8 GPIO_READ(UINT8 GPIO_num) ;
- void GPIO_init(UINT8 GPIO_num);
- void RTCInit(void);
- void GPIO_inout(UINT8 GPIO_num,UINT8 in_out);
- void GPIO_SET(UINT8 GPIO_num,UINT8 High_Low);
- void __irq IRQ_Timer0 (void);
- void __irq IRQ_RTC (void);
- //--------------------------------------------------------------------------------