A class to call a function at the main function at regular intervals (using Ticker class)

Dependents:   GPS_0002 optWingforHAPS_Eigen hexaTest_Eigen

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LoopTicker.hpp Source File

LoopTicker.hpp

00001 #ifndef _LOOPTICKER_HPP_
00002 #define _LOOPTICKER_HPP_
00003 
00004 #include "mbed.h"
00005 
00006 class LoopTicker
00007 {
00008 public:
00009     LoopTicker();
00010     void attach(void (*fptr_)(), float time_);
00011     void detach();
00012     void loop();
00013 private:
00014     Ticker ticker_;
00015     void (*fptr)();
00016     float time;
00017     bool updated;
00018     void interrupt();
00019 };
00020 
00021 #endif