Open RTS
Full implementation of the Somfy RTS protocol
Loading...
Searching...
No Matches
rts_radio.h
Go to the documentation of this file.
1#ifndef RTS_RADIO_H
2#define RTS_RADIO_H
3
4#include <ookradio.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
27
31struct rts_radio {
32 void (*set_mode)(struct rts_radio *radio, enum rts_radio_mode mode);
33
34 union {
35 struct rfm69 rfm69;
36 struct sx1278 sx1278;
37 };
38};
39
48struct rfm69 *rts_radio_init_rfm69(struct rts_radio *radio, struct spi_module *spi);
49
58struct sx1278 *rts_radio_init_sx1278(struct rts_radio *radio, struct spi_module *spi);
59
69void rts_radio_set_mode(struct rts_radio *radio, enum rts_radio_mode mode);
70
75#ifdef __cplusplus
76} // extern "C"
77#endif
78
79#endif // RTS_RADIO_H
rts_radio_mode
The transceiver mode to enter.
Definition rts_radio.h:22
@ RTS_RADIO_MODE_TRANSMIT
Transmit mode.
Definition rts_radio.h:25
@ RTS_RADIO_MODE_STANDBY
Standby mode.
Definition rts_radio.h:23
@ RTS_RADIO_MODE_RECEIVE
Receive mode.
Definition rts_radio.h:24
An SPI-attached SX1231 or RFM69 radio module.
Definition rfm69.h:24
Abstraction layer which configures radio modules for RTS.
Definition rts_radio.h:31
Hardware abstraction layer for userland SPI drivers.
Definition spi_module.h:22
An SPI-attached SX1278 or RFM96 radio module.
Definition sx1278.h:24