Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_ramp.h
1 #ifndef _BC_RAMP_H
2 #define _BC_RAMP_H
3 
4 #include <bc_tick.h>
5 
9 
11 
12 typedef struct
13 {
14  bool _active;
15 
16  bc_tick_t _duration;
17 
18  float _start;
19  float _stop;
20  float _now;
21 
22  bc_tick_t _tick_start;
23  bc_tick_t _tick_end;
24 
25 } bc_ramp_t;
26 
28 
34 
35 void bc_ramp_init(bc_ramp_t *self, float start, float stop, bc_tick_t duration);
36 
39 
40 void bc_ramp_start(bc_ramp_t *self);
41 
45 
46 float bc_ramp_get(bc_ramp_t *self);
47 
49 
50 #endif // _BC_RAMP_H
uint64_t bc_tick_t
Timestamp data type.
Definition: bc_tick.h:16
void bc_ramp_init(bc_ramp_t *self, float start, float stop, bc_tick_t duration)
Initialize ramp instance.
Definition: bc_ramp.c:5
void bc_ramp_start(bc_ramp_t *self)
Start ramp sequence.
Definition: bc_ramp.c:16
float bc_ramp_get(bc_ramp_t *self)
Get current ramp value.
Definition: bc_ramp.c:24