Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc. http://www.blynk.cc/
Dependents: Blynk_RBL_BLE_Nano Blynk_MicroBit Blynk_Serial Blynk_RBL_BLE_Nano
Diff: BlynkApiMbed.h
- Revision:
- 15:975b60f7a8ff
- Parent:
- 14:76d8fd871a4d
- Child:
- 16:6d9bf99b263c
--- a/BlynkApiMbed.h Tue Jun 20 00:20:01 2017 +0300 +++ b/BlynkApiMbed.h Mon Nov 27 19:48:07 2017 +0200 @@ -11,44 +11,8 @@ #ifndef BlynkApiMbed_h #define BlynkApiMbed_h -#include "mbed.h" - -static Timer blynk_millis_timer; -static Ticker blynk_waker; - -static -void blynk_wake() { - //pc.puts("(...)"); -} - -static -void delay(unsigned long ms) -{ - wait_ms(ms); -} - -static -unsigned long millis(void) -{ - return blynk_millis_timer.read_ms(); -} - #include <Blynk/BlynkApi.h> -template<class Proto> -void BlynkApi<Proto>::Init() -{ - blynk_waker.attach(&blynk_wake, 2.0); - blynk_millis_timer.start(); -} - -template<class Proto> -BLYNK_FORCE_INLINE -millis_time_t BlynkApi<Proto>::getMillis() -{ - return blynk_millis_timer.read_ms(); -} - #ifdef BLYNK_NO_INFO template<class Proto>