diff options
author | marcoveeneman <marco-veeneman@hotmail.com> | 2016-04-11 20:12:36 +0200 |
---|---|---|
committer | marcoveeneman <marco-veeneman@hotmail.com> | 2016-04-11 20:12:36 +0200 |
commit | 1244b8c9abb99eb6280aad5a5e3caa9da81d8d99 (patch) | |
tree | c58db3f7cfa143108137084ca2b1d642f2c7230d | |
parent | bae745fd33b11e9bf3d092d425bd5ec364759cdc (diff) | |
download | ChibiOS-Contrib-1244b8c9abb99eb6280aad5a5e3caa9da81d8d99.tar.gz ChibiOS-Contrib-1244b8c9abb99eb6280aad5a5e3caa9da81d8d99.tar.bz2 ChibiOS-Contrib-1244b8c9abb99eb6280aad5a5e3caa9da81d8d99.zip |
Disabled SPI support in halconf.h and added some comments in main.c
-rw-r--r-- | testhal/TIVA/TM4C123x/WDG/halconf.h | 2 | ||||
-rw-r--r-- | testhal/TIVA/TM4C123x/WDG/main.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/testhal/TIVA/TM4C123x/WDG/halconf.h b/testhal/TIVA/TM4C123x/WDG/halconf.h index 05620b8..0fca7c8 100644 --- a/testhal/TIVA/TM4C123x/WDG/halconf.h +++ b/testhal/TIVA/TM4C123x/WDG/halconf.h @@ -105,7 +105,7 @@ * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI FALSE #endif /** diff --git a/testhal/TIVA/TM4C123x/WDG/main.c b/testhal/TIVA/TM4C123x/WDG/main.c index 3aa8a07..d8bb265 100644 --- a/testhal/TIVA/TM4C123x/WDG/main.c +++ b/testhal/TIVA/TM4C123x/WDG/main.c @@ -23,11 +23,14 @@ static bool watchdog_timeout(WDGDriver *wdgp) palSetPad(GPIOF, GPIOF_LED_RED); + /* Return true to prevent a reset on the next timeout.*/ return true; } /* - * Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)). + * Watchdog deadline set to one second. + * Use callback on first timeout. + * Stall timer if paused by debugger. */ static const WDGConfig wdgcfg = { @@ -67,6 +70,7 @@ int main(void) { */ while (true) { if (palReadPad(GPIOF, GPIOF_SW1)) { + /* Only reset the watchdog if the button is not pressed */ wdgReset(&WDGD1); palClearPad(GPIOF, GPIOF_LED_RED); } |