Open RTS
Full implementation of the Somfy RTS protocol
Loading...
Searching...
No Matches
rts_pulse_source.h
Go to the documentation of this file.
1
#ifndef RTS_PULSE_SOURCE_H
2
#define RTS_PULSE_SOURCE_H
3
4
#include <stdbool.h>
5
#include <stdint.h>
6
7
#include "
rts_frame_builder.h
"
8
9
#ifdef __cplusplus
10
extern
"C"
{
11
#endif
12
35
struct
rts_pulse_source
{
36
struct
rts_frame_builder
*frame_builder;
37
38
void (*enable)(
struct
rts_pulse_source
*pulse_source);
39
void (*disable)(
struct
rts_pulse_source
*pulse_source);
40
void (*update)(
struct
rts_pulse_source
*pulse_source);
41
void (*close)(
struct
rts_pulse_source
*pulse_source);
42
43
bool
last_state;
44
uint64_t last_updated;
45
46
union
{
47
void
*user_data_ptr;
48
int
user_data_int;
49
};
50
};
51
59
void
rts_pulse_source_enable(
struct
rts_pulse_source
*pulse_source);
60
68
void
rts_pulse_source_disable(
struct
rts_pulse_source
*pulse_source);
69
77
void
rts_pulse_source_update(
struct
rts_pulse_source
*pulse_source);
78
87
void
rts_pulse_source_attach(
struct
rts_pulse_source
*pulse_source,
88
struct
rts_frame_builder
*frame_builder);
89
98
void
rts_pulse_source_close(
struct
rts_pulse_source
*pulse_source);
99
104
#ifdef __cplusplus
105
}
// extern "C"
106
#endif
107
108
#endif
// RTS_PULSE_SOURCE_H
rts_frame_builder.h
rts_frame_builder
Assembles pulses received via rts_frame_builder_handle_pulse, into a complete rts_frame,...
Definition
rts_frame_builder.h:36
rts_pulse_source
Provides an interface for a source of RTS pulses, eg a GPIO or radio.
Definition
rts_pulse_source.h:35
src
openrts
rts_pulse_source.h
Generated by
1.9.8