Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_pulse_counter.h
1 #ifndef BCL_INC_BC_PULSE_COUNTER_H_
2 #define BCL_INC_BC_PULSE_COUNTER_H_
3 
4 #include <bc_gpio.h>
5 #include <bc_scheduler.h>
6 #include <bc_exti.h>
7 #include <bc_module_sensor.h>
8 
12 
14 
15 typedef enum
16 {
19 
22 
25 
27 
29 
30 typedef enum
31 {
34 
37 
39 
43 
45 
50 
51 void bc_pulse_counter_set_event_handler(bc_module_sensor_channel_t channel, void (*event_handler)(bc_module_sensor_channel_t, bc_pulse_counter_event_t, void *), void *event_param);
52 
56 
58 
62 
63 void bc_pulse_counter_set(bc_module_sensor_channel_t channel, unsigned int count);
64 
68 
70 
73 
75 
77 
78 #endif // BCL_INC_BC_PULSE_COUNTER_H_
Rise edge is active.
uint64_t bc_tick_t
Timestamp data type.
Definition: bc_tick.h:16
void bc_pulse_counter_set_update_interval(bc_module_sensor_channel_t channel, bc_tick_t interval)
Set update interval.
void bc_pulse_counter_init(bc_module_sensor_channel_t channel, bc_pulse_counter_edge_t edge)
Initialize pulse counter.
EXTI line is configured to both rising and falling edge sensitivity.
Definition: bc_exti.h:204
EXTI line is configured to rising edge sensitivity.
Definition: bc_exti.h:198
Fall edge is active.
void bc_pulse_counter_set(bc_module_sensor_channel_t channel, unsigned int count)
Set count.
unsigned int bc_pulse_counter_get(bc_module_sensor_channel_t channel)
Get count.
Rise and fall edges are active.
bc_pulse_counter_event_t
Pulse counter event.
void bc_pulse_counter_reset(bc_module_sensor_channel_t channel)
Set count to zero.
bc_module_sensor_channel_t
Sensor Module channels.
void bc_pulse_counter_set_event_handler(bc_module_sensor_channel_t channel, void(*event_handler)(bc_module_sensor_channel_t, bc_pulse_counter_event_t, void *), void *event_param)
Set callback function.
bc_pulse_counter_edge_t
Pulse counter active edges.
EXTI line is configured to falling edge sensitivity.
Definition: bc_exti.h:201