Portability enhancements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10516 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
a093ad6f13
commit
08cde32294
|
@ -31,6 +31,9 @@
|
|||
|
||||
#define PORTAB_LINE_LED1 LINE_LED_GREEN
|
||||
#define PORTAB_LINE_LED2 LINE_LED_RED
|
||||
#define PORTAB_LEN_OFF PAL_LOW
|
||||
#define PORTAB_LEN_ON PAL_HIGH
|
||||
|
||||
#define PORTAB_LINE_BUTTON LINE_JOY_CENTER
|
||||
#define PORTAB_BUTTON_PRESSED PAL_HIGH
|
||||
|
||||
|
|
|
@ -96,10 +96,10 @@ int main(void) {
|
|||
|
||||
events = chEvtWaitOne(EVENT_MASK(0) | EVENT_MASK(1));
|
||||
if (events & EVENT_MASK(0)) {
|
||||
palSetLine(PORTAB_LINE_LED1);
|
||||
palWriteLine(PORTAB_LINE_LED1, PORTAB_LEN_ON);
|
||||
}
|
||||
if (events & EVENT_MASK(1)) {
|
||||
palClearLine(PORTAB_LINE_LED1);
|
||||
palWriteLine(PORTAB_LINE_LED1, PORTAB_LEN_OFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue