Disabled SPI support in halconf.h and added some comments in main.c

This commit is contained in:
marcoveeneman 2016-04-11 20:12:36 +02:00
parent bae745fd33
commit 1244b8c9ab
2 changed files with 6 additions and 2 deletions

View File

@ -105,7 +105,7 @@
* @brief Enables the SPI subsystem. * @brief Enables the SPI subsystem.
*/ */
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
#define HAL_USE_SPI TRUE #define HAL_USE_SPI FALSE
#endif #endif
/** /**

View File

@ -23,11 +23,14 @@ static bool watchdog_timeout(WDGDriver *wdgp)
palSetPad(GPIOF, GPIOF_LED_RED); palSetPad(GPIOF, GPIOF_LED_RED);
/* Return true to prevent a reset on the next timeout.*/
return true; 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 = static const WDGConfig wdgcfg =
{ {
@ -67,6 +70,7 @@ int main(void) {
*/ */
while (true) { while (true) {
if (palReadPad(GPIOF, GPIOF_SW1)) { if (palReadPad(GPIOF, GPIOF_SW1)) {
/* Only reset the watchdog if the button is not pressed */
wdgReset(&WDGD1); wdgReset(&WDGD1);
palClearPad(GPIOF, GPIOF_LED_RED); palClearPad(GPIOF, GPIOF_LED_RED);
} }