Here, alternative functions and classes for STM32. The program contains a class for the I2C software bus, a class for working with a watchdog timer and time delay functions based on DWT. All functions and classes use the HAL library. Functions and classes were written for the microcontroller stm32f103.
Dependents: STM32_F1XX_Alternative
Diff: WatchdogTimer.hpp
- Revision:
- 0:2f819bf6cd99
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WatchdogTimer.hpp Wed May 24 19:04:12 2017 +0000 @@ -0,0 +1,28 @@ +#ifndef _STM32_WATCHDOG_TIMER_H +#define _STM32_WATCHDOG_TIMER_H + +#include "mbed.h" + +class WatchdogTimer { + public: + enum enumWatchdogTimer { + RESET = 0, + READY, + BUSY, + TIMEOUT, + ERROR, + UNKNOWN + }; + WatchdogTimer(); + WatchdogTimer(float time); + void setResponseTime_us(uint32_t time); + void setResponseTime_ms(uint32_t time); + void setResponseTime_s(uint32_t time); + void setResponseTime(float time); + void refresh(void); + void start(void); + enumWatchdogTimer getStatus(void); + private: +}; + +#endif // _STM32_WATCHDOG_TIMER_H \ No newline at end of file