lpc1768 compiler

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

lpc1768 compiler

1,494 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mayotte1 on Tue Aug 17 12:00:58 MST 2010
I have a program I copied from my old lpc2148 programs that uses the rtc values (HOUR, etc). The lpcxpresso gets this error "

/src/main.c:2636: error: 'MONTH' undeclared (first use in this function)"

In the includes folder I have the CMSISv1p30_LPC17XX/INC file which defines this register.   Can anybody tell me why it doesn't recognize this definition? I have that file checked in the program reference box. I also had the lpc17xx.h file in my inc folder and the src folder but this didn't help either.

here it is on the last line of the snippet of the lpc1768.h folder
/*------------- Real-Time Clock (RTC) ----------------------------------------*/
typedef struct
{
  __IO uint8_t  ILR;
       uint8_t  RESERVED0[7];
  __IO uint8_t  CCR;
       uint8_t  RESERVED1[3];
  __IO uint8_t  CIIR;
       uint8_t  RESERVED2[3];
  __IO uint8_t  AMR;
       uint8_t  RESERVED3[3];
  __I  uint32_t CTIME0;
  __I  uint32_t CTIME1;
  __I  uint32_t CTIME2;
  __IO uint8_t  SEC;
       uint8_t  RESERVED4[3];
  __IO uint8_t  MIN;
       uint8_t  RESERVED5[3];
  __IO uint8_t  HOUR;

:confused:

Original Attachment has been moved to: 1100607_ldivtest.zip

0 项奖励
回复
3 回复数

1,405 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mayotte1 on Tue Aug 17 14:14:12 MST 2010
thank you
0 项奖励
回复

1,405 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Aug 17 13:30:14 MST 2010
CMSIS is declaring structs and using pointers :eek:, so accessing RTC values is done with:

[SIZE=2]LPC_RTC->HOUR [/SIZE]
0 项奖励
回复

1,405 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mayotte1 on Tue Aug 17 12:02:57 MST 2010
sorry. here is the attachment I left out
0 项奖励
回复