Attachments are accessible only for community members.
Aug 07, 2014
01:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 07, 2014
01:54 AM
I have set up a control reg for selecting CS on a couple of SPI devices but when I attempt to compile the code, I get error that reference not found. I have attached my project. Thanks for your help
Labels
- Labels:
-
PSoC 5LP
2 Replies
Aug 07, 2014
06:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 07, 2014
06:08 AM
This code looks like you have an attempt to define a structure
and a f() mistypped, ie. seperate deliniation between structure
and f()....?
struct Timetype GetTime(void)
{
struct Timetype t;
unsigned char tbuf[8];
unsigned char i;
SPI_SELECT_Write(RTC_SEL);
writeSPI( RTCREAD + regSECOND); // write command
for (i = 0; i<7; i++)
{
tbuf = writeSPI(0);
}
SPI_SELECT_Write(RTC_SEL);
t.Second = tbuf[0] & 0x7f;
t.Minute = tbuf[1] & 0x7f;
t.Hour = tbuf[2] & 0x3f;
t.Day = tbuf[3] & 0x3f;
t.Month = tbuf[5] & 0x1f;
t.Year = tbuf[6];
return t;
}
Aug 07, 2014
07:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 07, 2014
07:21 AM