From 4435bdec242f1518ee0b4fcf93d8eec4341697e3 Mon Sep 17 00:00:00 2001 From: marcoveeneman Date: Sun, 30 Oct 2016 14:34:58 +0100 Subject: Replaced port+pad by line in the demos and testhal. --- testhal/TIVA/TM4C123x/WDG/main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'testhal/TIVA/TM4C123x/WDG/main.c') diff --git a/testhal/TIVA/TM4C123x/WDG/main.c b/testhal/TIVA/TM4C123x/WDG/main.c index d5fa9e6..63f76f5 100644 --- a/testhal/TIVA/TM4C123x/WDG/main.c +++ b/testhal/TIVA/TM4C123x/WDG/main.c @@ -21,7 +21,7 @@ static bool watchdog_timeout(WDGDriver *wdgp) { (void)wdgp; - palSetPad(GPIOF, GPIOF_LED_RED); + palSetLine(LINE_LED_RED); /* Return true to prevent a reset on the next timeout.*/ return true; @@ -54,11 +54,10 @@ int main(void) { halInit(); chSysInit(); - palSetPadMode(GPIOF, GPIOF_LED_RED, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOF, GPIOF_LED_BLUE, PAL_MODE_OUTPUT_PUSHPULL); + palSetLineMode(LINE_LED_RED, PAL_MODE_OUTPUT_PUSHPULL); + palSetLineMode(LINE_LED_BLUE, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOF, GPIOF_SW1, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOF, GPIOF_SW2, PAL_MODE_INPUT_PULLUP); + palSetLineMode(LINE_SW1, PAL_MODE_INPUT_PULLUP); /* * Starting the watchdog driver. @@ -69,13 +68,13 @@ int main(void) { * Normal main() thread activity, it resets the watchdog. */ while (true) { - if (palReadPad(GPIOF, GPIOF_SW1)) { + if (palReadLine(LINE_SW1)) { /* Only reset the watchdog if the button is not pressed */ wdgReset(&WDGD1); - palClearPad(GPIOF, GPIOF_LED_RED); + palClearLine(LINE_LED_RED); } - palTogglePad(GPIOF, GPIOF_LED_BLUE); + palToggleLine(LINE_LED_BLUE); chThdSleepMilliseconds(500); } -- cgit v1.2.3