MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
timer.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <stdint.h>
9 
10 #include "metawearboard_fwd.h"
11 #include "timer_fwd.h"
12 
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
29 METAWEAR_API void mbl_mw_timer_create(MblMwMetaWearBoard *board, uint32_t period, uint16_t repetitions, uint8_t delay, void *context, MblMwFnTimerPtr received_timer);
39 METAWEAR_API void mbl_mw_timer_create_indefinite(MblMwMetaWearBoard *board, uint32_t period, uint8_t delay, void *context, MblMwFnTimerPtr received_timer);
68 
69 #ifdef __cplusplus
70 }
71 #endif
Macros for identifying exported functions.
#define METAWEAR_API
Indicates the function should be exported to the symbol table
Definition: dllmarker.h:27
Forward declarations for the MblMwMetaWearBoard type.
struct MblMwMetaWearBoard MblMwMetaWearBoard
Software representation of a physical MetaWear board.
Definition: metawearboard_fwd.h:17
METAWEAR_API void mbl_mw_timer_create_indefinite(MblMwMetaWearBoard *board, uint32_t period, uint8_t delay, void *context, MblMwFnTimerPtr received_timer)
Creates a timer that will run indefinitely.
METAWEAR_API uint8_t mbl_mw_timer_get_id(const MblMwTimer *timer)
Retrieves the id value identifying the timer.
METAWEAR_API void mbl_mw_timer_stop(const MblMwTimer *timer)
Stops a timer.
METAWEAR_API MblMwTimer * mbl_mw_timer_lookup_id(const MblMwMetaWearBoard *board, uint8_t id)
Looks up the MblMwTimer object corresponding to the id.
METAWEAR_API void mbl_mw_timer_start(const MblMwTimer *timer)
Starts a timer.
METAWEAR_API void mbl_mw_timer_remove(MblMwTimer *timer)
Removes the timer from the board.
METAWEAR_API void mbl_mw_timer_create(MblMwMetaWearBoard *board, uint32_t period, uint16_t repetitions, uint8_t delay, void *context, MblMwFnTimerPtr received_timer)
Creates a timer that will run for a set number of repetitions.
Forward declaration of the MblMwTimer type.
void(* MblMwFnTimerPtr)(void *context, MblMwTimer *timer)
Definition for callback functions that accept an MblMwTimer pointer.
Definition: timer_fwd.h:23
struct MblMwTimer MblMwTimer
On board timer that periodically fires events.
Definition: timer_fwd.h:15