37 #include <sys/select.h>
38 #include <sys/types.h>
41 #include <mraa/uart.h>
43 #define HMTRP_DEFAULT_UART 0
85 typedef enum { RESET = 0xf0,
88 SET_RF_DATARATE = 0xc3,
90 SET_FREQ_MODULATION = 0xa5,
92 SET_UART_SPEED = 0x1e,
93 GET_RF_SIGNAL_STR = 0xa7,
94 GET_MOD_SIGNAL_STR = 0x78
102 HMTRP(
int uart=HMTRP_DEFAULT_UART);
126 int readData(
char *buffer,
size_t len,
int millis=-1);
171 bool getConfig(uint32_t *freq, uint32_t *dataRate, uint16_t *rxBandwidth,
172 uint8_t *modulation, uint8_t *txPower, uint32_t *uartBaud);
247 mraa_uart_context m_uart;
bool setRFDataRate(uint32_t rate)
Definition: hmtrp.cxx:282
bool setTransmitPower(uint8_t power)
Definition: hmtrp.cxx:355
bool setFrequencyModulation(uint8_t modulation)
Definition: hmtrp.cxx:332
bool setUARTSpeed(uint32_t speed)
Definition: hmtrp.cxx:378
bool getModSignalStrength(uint8_t *strength)
Definition: hmtrp.cxx:435
HMTRP(int uart=HMTRP_DEFAULT_UART)
Definition: hmtrp.cxx:38
bool checkOK()
Definition: hmtrp.cxx:163
bool setupTty(speed_t baud=B9600)
Definition: hmtrp.cxx:135
bool setRXBandwidth(uint16_t rxBand)
Definition: hmtrp.cxx:308
~HMTRP()
Definition: hmtrp.cxx:66
bool setFrequency(uint32_t freq)
Definition: hmtrp.cxx:264
bool reset()
Definition: hmtrp.cxx:184
C++ API for the HMTRP Serial RF Pro.
Definition: hmtrp.h:81
int readData(char *buffer, size_t len, int millis=-1)
Definition: hmtrp.cxx:97
bool getRFSignalStrength(uint8_t *strength)
Definition: hmtrp.cxx:405
int writeData(char *buffer, size_t len)
Definition: hmtrp.cxx:117
bool dataAvailable(unsigned int millis=0)
Definition: hmtrp.cxx:74
bool getConfig(uint32_t *freq, uint32_t *dataRate, uint16_t *rxBandwidth, uint8_t *modulation, uint8_t *txPower, uint32_t *uartBaud)
Definition: hmtrp.cxx:197