mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
parent
38f2da2e2e
commit
fa01d92dde
@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -29,5 +29,6 @@ namespace DRIVERS {
|
||||
struct Board : public Driver {
|
||||
using Driver::Driver;
|
||||
virtual void reset() {}
|
||||
virtual void periodic() {}
|
||||
};
|
||||
}
|
||||
|
||||
@ -242,6 +242,7 @@ void loop() {
|
||||
|
||||
_out.kbd->periodic();
|
||||
_out.mouse->periodic();
|
||||
_board->periodic();
|
||||
|
||||
# ifdef CMD_SERIAL
|
||||
static unsigned long last = micros();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user