X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=int%2Finterface.c;h=312689a3682098c3c66fba95fbb7da0e1ccb064a;hb=8c4fb11d9a590d3f9d361c36e0cb476568c00735;hp=7fcc14832e4966d92f4a0892bbdd42941a626afb;hpb=3717889965f37ab0670a4e74f5e378c5cd9996f7;p=mTask.git diff --git a/int/interface.c b/int/interface.c index 7fcc148..312689a 100644 --- 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) { + if(i == 3){ + return palReadLine(LINE_BUTTON) == PAL_HIGH; + } return palReadLine(dpins[i]) == PAL_HIGH; } @@ -78,9 +81,12 @@ void debug(char *fmt, ...) write_byte((uint8_t)fmt[i]); } write_byte('\n'); -#ifdef DEBUG -#endif - (void)fmt; +} + +void debugi(int i) +{ + char m[10]; + debug(itoa(i, m, 10)); } void pdie(char *s) @@ -90,5 +96,11 @@ void pdie(char *s) 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; }