repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
t
[mTask.git]
/
int
/
interface.c
diff --git
a/int/interface.c
b/int/interface.c
index
7fcc148
..
962ce30
100644
(file)
--- a/
int/interface.c
+++ b/
int/interface.c
@@
-39,6
+39,9
@@
void write_dpin(uint8_t i, bool b)
bool read_dpin(uint8_t i)
{
bool read_dpin(uint8_t i)
{
+ if(i == 3){
+ return palReadLine(LINE_BUTTON) == PAL_HIGH;
+ }
return palReadLine(dpins[i]) == PAL_HIGH;
}
return palReadLine(dpins[i]) == PAL_HIGH;
}
@@
-72,13
+75,13
@@
void setup(void)
void debug(char *fmt, ...)
{
void debug(char *fmt, ...)
{
+#ifdef DEBUG
unsigned int i;
write_byte('m');
for(i = 0; i<strlen(fmt); i++){
write_byte((uint8_t)fmt[i]);
}
write_byte('\n');
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
(void)fmt;
}
#endif
(void)fmt;
}
@@
-90,5
+93,8
@@
void pdie(char *s)
void die(char *fmt, ...)
{
void die(char *fmt, ...)
{
+ palWriteLine(LINE_LED1, PAL_HIGH);
+ palWriteLine(LINE_LED2, PAL_HIGH);
+ palWriteLine(LINE_LED3, PAL_HIGH);
(void)fmt;
}
(void)fmt;
}