写ARM的C程序遇到的一点小问题
小弟在用C写ARM的程序时候,碰到一点小问题,一直没明白,请高手给指点下:
#include <stdio.h> /* standard I/O .h-file */#include <ctype.h> /* character functions */#include <LPC23xx.H> #include "config.h"//提示错误的头文件#include "I2CINT.h"int main(void){//锁定PLLPLLCON = 1; // 使能PLLPLLCFG = 0xB; // 设置M 为6,P 为2PLLFEED = 0xAA; // 发送PLL 馈送序列PLLFEED = 0x55; while((PLLSTAT & (1 << 26)) == 0); // 等待PLL 锁定PLLCON = 3; // PLL使能和连接PLLFEED = 0xAA; // 发送PLL 馈送序列PLLFEED = 0x55;//配置管脚PINSEL0=0xC0000050;PINSEL1=0x014043FF;PINSEL3=0x00000000;PINSEL2=0x01500000;//RTC地址0XEB//uint8 I2C_ReadNByte (uint8 sla, uint32 suba_type, uint32 suba, uint8 *s, uint32 num);#define RTC 0xEB#define RTC_sec 0x00uint8 sec;//问题出在这里,uint8在config.h头文件里面定义//I2C_ReadNByte(RTC,ONE_BYTE_SUBA,RTC_sec,sec,1);sec=1;//还有这里}#ifndef __CONFIG_H#define __CONFIG_H// 不能被更改#ifndef TRUE#define TRUE 1#endif#ifndef FALSE#define FALSE 0#endiftypedef unsigned char uint8; /* 无符号8 位整型变量 */typedef signed char int8; /* 有符号8 位整型变量 */typedef unsigned short uint16; /* 无符号16 位整型变量 */typedef signed short int16; /* 有符号16 位整型变量 */typedef unsigned int uint32; /* 无符号32 位整型变量 */typedef signed int int32; /* 有符号32 位整型变量 */typedef float fp32; /* 单精度浮点数(32 位长度) */typedef double fp64; /* 双精度浮点数(64 位长度) */#endif