Firmware SDK
twr_ramp

Ramping algorithm library (e.g. can be used for PWM up/down ramping for LED control, motor control, etc.) More...

Functions

void twr_ramp_init (twr_ramp_t *self, float start, float stop, twr_tick_t duration)
 Initialize ramp instance. More...
 
void twr_ramp_start (twr_ramp_t *self)
 Start ramp sequence. More...
 
float twr_ramp_get (twr_ramp_t *self)
 Get current ramp value. More...
 

Detailed Description

Ramping algorithm library (e.g. can be used for PWM up/down ramping for LED control, motor control, etc.)

Function Documentation

◆ twr_ramp_get()

float twr_ramp_get ( twr_ramp_t *  self)

Get current ramp value.

Parameters
[in]selfInstance
Returns
Ramp point

Definition at line 24 of file twr_ramp.c.

Here is the call graph for this function:

◆ twr_ramp_init()

void twr_ramp_init ( twr_ramp_t *  self,
float  start,
float  stop,
twr_tick_t  duration 
)

Initialize ramp instance.

Parameters
[in]selfInstance
[in]startStart point
[in]stopStop point
[in]durationRamp duration in ticks

Definition at line 5 of file twr_ramp.c.

◆ twr_ramp_start()

void twr_ramp_start ( twr_ramp_t *  self)

Start ramp sequence.

Parameters
[in]selfInstance

Definition at line 16 of file twr_ramp.c.

Here is the call graph for this function: