Firmware SDK
twr_ramp.h
1
#ifndef _TWR_RAMP_H
2
#define _TWR_RAMP_H
3
4
#include <twr_tick.h>
5
9
11
12
typedef
struct
13
{
14
bool
_active;
15
16
twr_tick_t
_duration;
17
18
float
_start;
19
float
_stop;
20
float
_now;
21
22
twr_tick_t
_tick_start;
23
twr_tick_t
_tick_end;
24
25
} twr_ramp_t;
26
28
34
35
void
twr_ramp_init
(twr_ramp_t *
self
,
float
start,
float
stop,
twr_tick_t
duration);
36
39
40
void
twr_ramp_start
(twr_ramp_t *
self
);
41
45
46
float
twr_ramp_get
(twr_ramp_t *
self
);
47
49
50
#endif
// _TWR_RAMP_H
twr_ramp_get
float twr_ramp_get(twr_ramp_t *self)
Get current ramp value.
Definition:
twr_ramp.c:24
twr_ramp_init
void twr_ramp_init(twr_ramp_t *self, float start, float stop, twr_tick_t duration)
Initialize ramp instance.
Definition:
twr_ramp.c:5
twr_ramp_start
void twr_ramp_start(twr_ramp_t *self)
Start ramp sequence.
Definition:
twr_ramp.c:16
twr_tick_t
uint64_t twr_tick_t
Timestamp data type.
Definition:
twr_tick.h:16
twr
inc
twr_ramp.h
Generated by
1.9.1