summaryrefslogtreecommitdiff
path: root/hid/lib/drivers-stm32/board-stm32.h
diff options
context:
space:
mode:
Diffstat (limited to 'hid/lib/drivers-stm32/board-stm32.h')
-rw-r--r--hid/lib/drivers-stm32/board-stm32.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/hid/lib/drivers-stm32/board-stm32.h b/hid/lib/drivers-stm32/board-stm32.h
index 212106b3..118138ad 100644
--- a/hid/lib/drivers-stm32/board-stm32.h
+++ b/hid/lib/drivers-stm32/board-stm32.h
@@ -23,16 +23,23 @@
#pragma once
#include "board.h"
+#include <libmaple/iwdg.h>
namespace DRIVERS {
class BoardStm32 : public Board {
public:
BoardStm32() : Board(BOARD){
+ //2 sec timeout
+ iwdg_init(IWDG_PRE_16, 0xFFF);
}
void reset() override {
nvic_sys_reset();
}
+
+ void periodic() {
+ iwdg_feed();
+ }
};
}