Speeduino
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
polling.hpp File Reference

Structures and functions for polling actions at specific frequencies. More...

#include <stdint.h>
#include "bit_manip.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  polledAction_t
 An action to be polled at a specific frequency. More...
 

Typedefs

using byte = uint8_t
 

Functions

static void executePolledAction (const polledAction_t &action, byte loopTimer)
 Conditionally execute a polled action if the timer bit is set.
 
static void executePolledArrayAction (uint8_t index, const polledAction_t *pActions, byte loopTimer)
 Execute a polled action at a specific index in the array of actions.
 

Detailed Description

Structures and functions for polling actions at specific frequencies.

Typedef Documentation

◆ byte

Function Documentation

◆ executePolledAction()

static void executePolledAction ( const polledAction_t action,
byte  loopTimer 
)
inlinestatic

Conditionally execute a polled action if the timer bit is set.

Parameters
actionThe action to execute
loopTimerThe current loop timer value (e.g. LOOP_TIMER)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ executePolledArrayAction()

static void executePolledArrayAction ( uint8_t  index,
const polledAction_t pActions,
byte  loopTimer 
)
inlinestatic

Execute a polled action at a specific index in the array of actions.

Note
Intent is to use this function with static_for to conditionally execute all actions in the array
Parameters
indexThe index of the action to execute
pActionsThe array of actions to execute from
loopTimerThe current loop timer value (e.g. LOOP_TIMER)
Here is the call graph for this function:
Here is the caller graph for this function: