rfm12 library extra features header More...
Go to the source code of this file.
Data Structures | |
| struct | rfm12_rfrxbuf_t |
| The receive buffer structure for the amplitude modulated receive feature. More... | |
Defines | |
States and buffer size for the amplitude modulated receive feature. | |
| |
| #define | RFM12_ASK_RFRXBUF_SIZE 55 |
| The ASK receive buffer size. | |
| #define | RFM12_ASK_STATE_EMPTY 0 |
| The ASK receive buffer is empty. | |
| #define | RFM12_ASK_STATE_RECEIVING 1 |
| The ASK receive buffer is active. | |
| #define | RFM12_ASK_STATE_FULL 2 |
| The ASK receive buffer is full. | |
States for the low battery detection feature . | |
| #define | RFM12_BATT_OKAY 0 |
| Battery voltage is okay. | |
| #define | RFM12_BATT_LOW 1 |
| Low battery voltage detected. | |
Functions | |
| void | adc_init (void) |
| ASK mode ADC interrupt setup. | |
| void | rfm12_ask_tx_mode (uint8_t setting) |
| En- or disable ASK transmissions. | |
| void | rfm12_tx_on (void) |
| Enable the transmitter immediately (ASK transmission mode). | |
| void | rfm12_tx_off (void) |
| Set default power mode (usually transmitter off, receiver on). | |
| void | rfm12_set_wakeup_timer (uint16_t val) |
| This function sets the wakeup timer register. | |
| void | rfm12_set_batt_detector (uint16_t val) |
| This function sets the low battery detector and microcontroller clock divider register. | |
| uint8_t | rfm12_get_batt_status (void) |
| Return the current low battery detector status. | |
Variables | |
| rfm12_rfrxbuf_t | ask_rxbuf |
| The ASK mode receive buffer structure. | |
rfm12 library extra features header
This header declares all stuff related to extra features.
| #define RFM12_ASK_RFRXBUF_SIZE 55 |
The ASK receive buffer size.
| #define RFM12_ASK_STATE_EMPTY 0 |
The ASK receive buffer is empty.
| #define RFM12_ASK_STATE_FULL 2 |
The ASK receive buffer is full.
| #define RFM12_ASK_STATE_RECEIVING 1 |
The ASK receive buffer is active.
| #define RFM12_BATT_LOW 1 |
Low battery voltage detected.
| #define RFM12_BATT_OKAY 0 |
Battery voltage is okay.
| void adc_init | ( | void | ) |
ASK mode ADC interrupt setup.
This will setup the ADC interrupt to receive ASK modulated signals. rfm12_init() calls this function automatically if ASK receive mode is enabled.
| void rfm12_ask_tx_mode | ( | uint8_t | setting | ) |
En- or disable ASK transmissions.
When enabling ASK tx mode, this function puts the internal state machine into transmit mode and disables the interrupt. Otherwise it will restore normale operation.
| [setting] | Pass 1 to enable the raw mode, 0 to disable it. |
| uint8_t rfm12_get_batt_status | ( | void | ) |
Return the current low battery detector status.
| void rfm12_set_batt_detector | ( | uint16_t | val | ) |
This function sets the low battery detector and microcontroller clock divider register.
| [val] | The register value to be passed to the rf12. See the rf12 datasheet for valid values. |
| void rfm12_set_wakeup_timer | ( | uint16_t | val | ) |
This function sets the wakeup timer register.
| [val] | The wakeup timer period value to be passed to the rf12. See the rf12 datasheet for valid values. |
| void rfm12_tx_off | ( | void | ) | [inline] |
Set default power mode (usually transmitter off, receiver on).
This will usually stop a transmission. This function is used to emulate amplitude modulated signals.
| void rfm12_tx_on | ( | void | ) | [inline] |
Enable the transmitter immediately (ASK transmission mode).
This will send out the current buffer contents. This function is used to emulate amplitude modulated signals.
The ASK mode receive buffer structure.
You will need to poll the state field of this structure to determine if data is available, see ASK mode defines.
Received data can be read from the buf field. It is necessary to reset the state field to RFM12_ASK_STATE_EMPTY after reading.

1.6.1