Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DISCO_IOT-wifi_client
Fork of stm-spirit1-rf-driver by
Diff: SimpleSpirit1.h
- Revision:
- 12:b8056eda4028
- Parent:
- 11:b769d6caad82
- Child:
- 14:898a9d48dd03
diff -r b769d6caad82 -r b8056eda4028 SimpleSpirit1.h
--- a/SimpleSpirit1.h Wed Oct 26 15:08:44 2016 +0200
+++ b/SimpleSpirit1.h Fri Oct 28 14:14:03 2016 +0200
@@ -66,16 +66,16 @@
* The +1 because of the first byte,
* which will contain the length of the packet.
*/
- uint16_t spirit_tx_len;
- bool _spirit_tx_started;
- uint16_t spirit_rx_len;
- uint16_t _spirit_rx_pos;
- bool _spirit_rx_err;
+ volatile uint16_t spirit_tx_len;
+ volatile bool _spirit_tx_started;
+ volatile uint16_t spirit_rx_len;
+ volatile uint16_t _spirit_rx_pos;
+ volatile bool _spirit_rx_err;
uint8_t spirit_rx_buf[MAX_PACKET_LEN];
+ volatile bool _is_receiving;
/** Status Variables from Cube Implementation **/
- volatile uint8_t receiving_packet;
- volatile unsigned int spirit_on;
+ unsigned int spirit_on;
uint8_t last_rssi; //MGR
uint8_t last_lqi; //MGR
@@ -391,14 +391,14 @@
*/
int channel_clear(void);
- /** Check if the radio driver is currently receiving a packet */
- int get_receiving_packet(void) {
- return receiving_packet;
- }
-
/** Check if the radio driver has just received a packet **/
int get_pending_packet(void);
+ /** Is radio currently receiving **/
+ bool is_receiving(void) {
+ return _is_receiving;
+ }
+
/** Get latest value of RSSI **/
float get_last_rssi_dbm(void) {
if(last_rssi == 0) {
