37 #include <sys/select.h>
38 #include <sys/types.h>
41 #include <mraa/uart.h>
43 #define HMTRP_DEFAULT_UART 0
86 typedef enum { RESET = 0xf0,
89 SET_RF_DATARATE = 0xc3,
91 SET_FREQ_MODULATION = 0xa5,
93 SET_UART_SPEED = 0x1e,
94 GET_RF_SIGNAL_STR = 0xa7,
95 GET_MOD_SIGNAL_STR = 0x78
103 HMTRP(
int uart=HMTRP_DEFAULT_UART);
127 int readData(
char *buffer,
int len,
int millis=-1);
172 bool getConfig(uint32_t *freq, uint32_t *dataRate, uint16_t *rxBandwidth,
173 uint8_t *modulation, uint8_t *txPower, uint32_t *uartBaud);
264 mraa_uart_context m_uart;
uint8_t getModSignalStrength()
Definition: hmtrp.cxx:496
bool setRFDataRate(uint32_t rate)
Definition: hmtrp.cxx:295
bool setTransmitPower(uint8_t power)
Definition: hmtrp.cxx:371
bool setFrequencyModulation(uint8_t modulation)
Definition: hmtrp.cxx:347
bool setUARTSpeed(uint32_t speed)
Definition: hmtrp.cxx:395
HMTRP(int uart=HMTRP_DEFAULT_UART)
Definition: hmtrp.cxx:40
bool checkOK()
Definition: hmtrp.cxx:176
bool setupTty(speed_t baud=B9600)
Definition: hmtrp.cxx:146
bool setRXBandwidth(uint16_t rxBand)
Definition: hmtrp.cxx:322
~HMTRP()
Definition: hmtrp.cxx:72
bool setFrequency(uint32_t freq)
Definition: hmtrp.cxx:277
bool reset()
Definition: hmtrp.cxx:197
API for the HM-TRP Serial RF Pro transceiver.
Definition: hmtrp.h:82
int writeData(char *buffer, int len)
Definition: hmtrp.cxx:126
uint8_t getRFSignalStrength()
Definition: hmtrp.cxx:455
bool dataAvailable(unsigned int millis=0)
Definition: hmtrp.cxx:78
int readData(char *buffer, int len, int millis=-1)
Definition: hmtrp.cxx:101
bool getConfig(uint32_t *freq, uint32_t *dataRate, uint16_t *rxBandwidth, uint8_t *modulation, uint8_t *txPower, uint32_t *uartBaud)
Definition: hmtrp.cxx:210