CC1101 sub-GHz radio driver (PROTOCORE_ENABLE_CC1101) - TI 300-928 MHz over SPI.
More...
|
| | PROTOCORE_NS_LAYOUT (Cc1101Ns, init, send, tx_done, set_rx, recv, rssi_dbm) |
| |
| proto_bool | protocore_cc1101_init (uint8_t *work, const protocore_cc1101_bus *bus, const protocore_cc1101_config *cfg) |
| | Reset the CC1101, apply cfg, set the channel, and confirm it is .
|
| |
| proto_bool | protocore_cc1101_send (uint8_t *work, const protocore_cc1101_bus *bus, const uint8_t *data, uint8_t len) |
| | Transmit len bytes as a variable-length packet (leading length .
|
| |
| proto_bool | protocore_cc1101_tx_done (uint8_t *work, const protocore_cc1101_bus *bus) |
| | True once the state machine has returned to IDLE after a transmit.
|
| |
| void | protocore_cc1101_set_rx (uint8_t *work, const protocore_cc1101_bus *bus) |
| | Flush RX and enter receive mode (strobe RX). Then poll .
|
| |
| int | protocore_cc1101_recv (uint8_t *work, const protocore_cc1101_bus *bus, uint8_t *buf, uint8_t cap, int16_t *rssi_dbm) |
| | If a packet is waiting, read it (length byte + payload + appended .
|
| |
| int16_t | protocore_cc1101_rssi_dbm (uint8_t *work, uint8_t raw) |
| | Convert a raw CC1101 RSSI register value to dBm (TI datasheet .
|
| |
CC1101 sub-GHz radio driver (PROTOCORE_ENABLE_CC1101) - TI 300-928 MHz over SPI.
A radio driver plugin for the gateway (PROTOCORE_ENABLE_GATEWAY): generic ISM-band remotes and sensors (OOK / 2-FSK on 315/433/868/915 MHz) bridged to the web stack. Like the nRF24, the CC1101 speaks an SPI header protocol - every transaction begins with a header byte (bit7 = read, bit6 = burst, bits5-0 = address) and returns the chip status byte (CHIP_RDYn, the 3-bit state machine value, and the FIFO-bytes-available count). Config registers live at 0x00-0x2E, the 13 command strobes at 0x30-0x3D (a single write triggers the command), the read-only status registers at 0x30-0x3D read with the burst bit set, and both FIFOs at 0x3F.
The huge modem configuration (band, data rate, deviation, sync word) is board/tool-specific, so the caller supplies it as a register table (a TI SmartRF Studio export); the driver resets the chip, writes that table, sets the channel, and verifies the VERSION status register talks back. Packets use variable length mode (a leading length byte) with appended RSSI/LQI status. Bridge received payloads northbound with protocore_gateway_uplink. The register/strobe/FIFO protocol is host-testable against a mock; the RF link needs the module.
work is bytes the CALLER holds. This module reads none of them: it carries nothing between calls, so there is no state to keep and nothing to wipe. The parameter is there so a caller drives every namespace the same way.
Definition in file cc1101.h.