Rev 256 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 256 | Rev 264 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | #include "91x_lib.h" |
59 | #include "91x_lib.h" |
60 | #include "i2c.h" |
60 | #include "i2c.h" |
61 | #include "uart1.h" |
61 | #include "uart1.h" |
62 | #include "timer1.h" |
62 | #include "timer1.h" |
63 | #include "eeprom.h" |
63 | #include "eeprom.h" |
- | 64 | #include "led.h" |
|
Line 64... | Line 65... | ||
64 | 65 | ||
65 | 66 | ||
Line 198... | Line 199... | ||
198 | AdrOffset += RxLen; |
199 | AdrOffset += RxLen; |
199 | DataLen -= RxLen; |
200 | DataLen -= RxLen; |
200 | } |
201 | } |
201 | return(retval); |
202 | return(retval); |
202 | } |
203 | } |
- | 204 | ||
- | 205 | u8 EEPROM_Init(void) |
|
- | 206 | { |
|
- | 207 | u8 data[20]; |
|
- | 208 | u8 i, retval = 0; |
|
- | 209 | UART1_PutString("\r\n EEprom init.."); |
|
- | 210 | // check if data can be read from eeprom |
|
- | 211 | for(i=0;i<10;i++) |
|
- | 212 | { |
|
- | 213 | UART1_Putchar('.'); |
|
- | 214 | if(EEPROM_SUCCESS == EEPROM_ReadBlock(0, data, 20)) retval = 1; |
|
- | 215 | if(retval) break; |
|
- | 216 | } |
|
- | 217 | if(retval) UART1_PutString("ok"); |
|
- | 218 | else UART1_PutString("failed"); |
|
- | 219 | return(retval); |
|
- | 220 | } |