pwm period is now 200us instead of the default 20ms veml6040 config is now AF_BIT | TRIG_BIT
Dependencies: mbed MMA8451Q USBDevice WakeUp vt100
Fork of afero_node_suntory_2017_06_15 by
util/WatchDogWrapper.cpp@23:e4d2316383a1, 2017-10-18 (annotated)
- Committer:
- Rhyme
- Date:
- Wed Oct 18 00:31:13 2017 +0000
- Revision:
- 23:e4d2316383a1
- Parent:
- 21:d03c7bbb9f37
pwm period is now 200us from default 20ms; veml6040->setCOLORCOnf is now AF_BIT | TRIG_BIT from 0x00;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wataloh | 21:d03c7bbb9f37 | 1 | #if defined(TARGET_KL25Z) |
wataloh | 21:d03c7bbb9f37 | 2 | |
wataloh | 21:d03c7bbb9f37 | 3 | #include "WatchDogWrapper.hpp" |
wataloh | 21:d03c7bbb9f37 | 4 | |
wataloh | 21:d03c7bbb9f37 | 5 | void WatchDogWrapper::empty() |
wataloh | 21:d03c7bbb9f37 | 6 | { |
wataloh | 21:d03c7bbb9f37 | 7 | } |
wataloh | 21:d03c7bbb9f37 | 8 | |
wataloh | 21:d03c7bbb9f37 | 9 | void WatchDogWrapper::_reset() |
wataloh | 21:d03c7bbb9f37 | 10 | { |
wataloh | 21:d03c7bbb9f37 | 11 | SIM->SRVCOP = (uint32_t)0x55u; |
wataloh | 21:d03c7bbb9f37 | 12 | SIM->SRVCOP = (uint32_t)0xAAu; |
wataloh | 21:d03c7bbb9f37 | 13 | } |
wataloh | 21:d03c7bbb9f37 | 14 | |
wataloh | 21:d03c7bbb9f37 | 15 | WatchDogWrapper::WatchDogWrapper() |
wataloh | 21:d03c7bbb9f37 | 16 | { |
wataloh | 21:d03c7bbb9f37 | 17 | SIM->COPC = 0x0C ; /* default value */ |
wataloh | 21:d03c7bbb9f37 | 18 | pReset = &WatchDogWrapper::_reset; |
wataloh | 21:d03c7bbb9f37 | 19 | } |
wataloh | 21:d03c7bbb9f37 | 20 | |
wataloh | 21:d03c7bbb9f37 | 21 | void WatchDogWrapper::kick_the_bucket() |
wataloh | 21:d03c7bbb9f37 | 22 | { |
wataloh | 21:d03c7bbb9f37 | 23 | pReset = &WatchDogWrapper::empty; |
wataloh | 21:d03c7bbb9f37 | 24 | SCB->AIRCR = 0x05FA0004 ; |
wataloh | 21:d03c7bbb9f37 | 25 | } |
wataloh | 21:d03c7bbb9f37 | 26 | |
wataloh | 21:d03c7bbb9f37 | 27 | void WatchDogWrapper::reset() |
wataloh | 21:d03c7bbb9f37 | 28 | { |
wataloh | 21:d03c7bbb9f37 | 29 | (this->*pReset)(); |
wataloh | 21:d03c7bbb9f37 | 30 | } |
wataloh | 21:d03c7bbb9f37 | 31 | |
wataloh | 21:d03c7bbb9f37 | 32 | #endif //TARGET_KL25Z |