uint8_t read_byte(void)
{
- return sdGet(&SD3);
+ return (uint8_t)sdGet(&SD3);
}
void write_byte(uint8_t b)
void debug(char *fmt, ...)
{
- unsigned int i;
- write_byte('m');
- for(i = 0; i<strlen(fmt); i++){
- write_byte((uint8_t)fmt[i]);
- }
- write_byte('\n');
-#ifdef DEBUG
-#endif
+// unsigned int i;
+// write_byte((uint8_t)'m');
+// for(i = 0; i<strlen(fmt); i++){
+// write_byte((uint8_t)fmt[i]);
+// }
+// write_byte('\n');
(void)fmt;
}
void die(char *fmt, ...)
{
+ palWriteLine(LINE_LED1, PAL_HIGH);
+ palWriteLine(LINE_LED2, PAL_HIGH);
+ palWriteLine(LINE_LED3, PAL_HIGH);
+ while(1){
+ delay(100);
+ }
(void)fmt;
}