Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
#include <NexTimer.h>
Public Member Functions | |
NexTimer (uint8_t pid, uint8_t cid, const char *name) | |
void | attachTimer (NexTouchEventCb timer, void *ptr=NULL) |
void | detachTimer (void) |
bool | getCycle (uint32_t *number) |
bool | setCycle (uint32_t number) |
bool | enable (void) |
bool | disable (void) |
uint32_t | Get_cycle_tim (uint32_t *number) |
bool | Set_cycle_tim (uint32_t number) |
void | attachPush (NexTouchEventCb push, void *ptr=NULL) |
void | detachPush (void) |
void | attachPop (NexTouchEventCb pop, void *ptr=NULL) |
void | detachPop (void) |
void | printObjInfo (void) |
Static Public Member Functions | |
static void | iterate (NexTouch **list, uint8_t pid, uint8_t cid, int32_t event) |
Protected Member Functions | |
uint8_t | getObjPid (void) |
uint8_t | getObjCid (void) |
const char * | getObjName (void) |
NexTimer component.
Commonly, you want to do something after set timer cycle and enable it,and the cycle value must be greater than 50
NexTimer::NexTimer | ( | uint8_t | pid, |
uint8_t | cid, | ||
const char * | name | ||
) |
Constructor.
pid | - page id. |
cid | - component id. |
name | - pointer to an unique name in range of all components. |
|
inherited |
Attach an callback function of pop touch event.
pop | - callback called with ptr when a pop touch event occurs. |
ptr | - parameter passed into pop[default:NULL]. |
|
inherited |
Attach an callback function of push touch event.
push | - callback called with ptr when a push touch event occurs. |
ptr | - parameter passed into push[default:NULL]. |
void NexTimer::attachTimer | ( | NexTouchEventCb | timer, |
void * | ptr = NULL |
||
) |
Attach an callback function of timer respond event.
timer | - callback called with ptr when a timer respond event occurs. |
ptr | - parameter passed into push[default:NULL]. |
|
inherited |
Detach an callback function.
|
inherited |
Detach an callback function.
void NexTimer::detachTimer | ( | void | ) |
Detach an callback function.
bool NexTimer::disable | ( | void | ) |
contorl timer disable.
true | - success. |
false | - failed. |
bool NexTimer::enable | ( | void | ) |
contorl timer enable.
true | - success. |
false | - failed. |
uint32_t NexTimer::Get_cycle_tim | ( | uint32_t * | number | ) |
Get tim attribute of component
number | - buffer storing data retur |
bool NexTimer::getCycle | ( | uint32_t * | number | ) |
Get the value of timer cycle val.
number | - an output parameter to save the value of timer cycle. |
true | - success. |
false | - failed. |
|
inherited |
Print current object'address, page id, component id and name.
bool NexTimer::Set_cycle_tim | ( | uint32_t | number | ) |
Set tim attribute of component
number | - To set up the data |
bool NexTimer::setCycle | ( | uint32_t | number | ) |
Set the value of timer cycle val.
number | - the value of timer cycle. |
true | - success. |
false | - failed. |