![]() |
MySensors Library & Examples
2.3.2-95-g0c695e3e
|
#include "CC1101Registers.h"#include <stdint.h>
Include dependency graph for CC1101.h:Go to the source code of this file.
Classes | |
| union | cc1101_controlFlags_t |
| Control flag data type. More... | |
| struct | __attribute__ |
| FW config structure, stored in eeprom. More... | |
| struct | __attribute__ |
| FW config structure, stored in eeprom. More... | |
| struct | __attribute__ |
| FW config structure, stored in eeprom. More... | |
| struct | cc1101_internal_t |
| CC1101 internal variables. More... | |
Macros | |
| #define | CC1101_SPI hwSPI |
| default SPI | |
| #define | DEFAULT_CC1101_GD0_PIN (2) |
| DEFAULT_CC1101_GD0_PIN. | |
| #define | DEFAULT_CC1101_CS_PIN (SS) |
| DEFAULT_CC1101_CS_PIN. | |
| #define | CC1101_CRYSTAL_HZ 26000000LL |
| #define | CC1101_315MHZ 315000000LL |
| #define | CC1101_433MHZ 433100000LL |
| #define | CC1101_868MHZ 868100000LL |
| #define | CC1101_915MHZ 915100000LL |
| #define | CC1101_FREQ_VAL (((MY_CC1101_FREQUENCY)*65536LL) / CC1101_CRYSTAL_HZ) |
| #define | CC1101_FREQ_BYTE0 ((CC1101_FREQ_VAL >> 16) & 0xFF) |
| #define | CC1101_FREQ_BYTE1 ((CC1101_FREQ_VAL >> 8) & 0xFF) |
| #define | CC1101_FREQ_BYTE2 (CC1101_FREQ_VAL & 0xFF) |
| #define | MY_CC1101_POWER_LEVEL CC1101_POWER_AUTO |
| Sets the transmit power level. More... | |
| #define | MY_CC1101_MIN_POWER_LEVEL (0) |
| Sets the minimum allowable output power level for AUTO. Default: -30dBm (0.001mW) | |
| #define | MY_CC1101_MAX_POWER_LEVEL (7) |
| Sets the maximum allowable output power level for AUTO. Default: 10dBm (10mW) More... | |
| #define | CC1101_ATC_TARGET_RANGE_DBM (15) |
| ATC target range +/- dBm. | |
| #define | CC1101_RSSI_OFFSET (74u) |
| RSSI offset. | |
| #define | CC1101_TARGET_RSSI (-50) |
| RSSI target. | |
| #define | CC1101_MODEM_S_BR4_8_FD20 0 |
| 135KHz bandwidth, 4800 baud, 19kHz deviation | |
| #define | CC1101_MODEM_M_BR38_4_FD20 1 |
| 200KHz bandwidth, 38400 baud, 47kHz deviation | |
| #define | CC1101_MODEM_F_BR100_FD50 2 |
| 200KHz bandwidth, 100000 baud, 47kHz deviation | |
| #define | CC1101_MODEM_XF_BR250_FD125 3 |
| 320KHz bandwidth, 250000 baud, 125kHz deviation | |
| #define | MY_CC1101_MODEM_CONFIGURATION CC1101_MODEM_M_BR38_4_FD20 |
| Defines the model speed and modulation parameters. More... | |
| #define | CC1101_MAX_PACKET_LEN (0x40u) |
| Maximum packet size that can be carried by the modem. | |
| #define | CC1101_PREAMBLE_LENGTH (8u) |
| Preamble length, default=8. | |
| #define | CC1101_BROADCAST_ADDRESS 0xFF |
| #define | MY_CC1101_SYNC_WORD 0xF543 |
| Sync word, can be used to separate networks. More... | |
| #define | CC1101_TX_RETRIES (5u) |
| Retries in case of fail to transmit (eg CCA) | |
| #define | MY_CC1101_TX_TIMEOUT_MS (50ul) |
| Timeout before TX is considered failed. | |
| #define | MY_CC1101_TX_RETRY_DELAY_MS (50l) |
| Delay before reattempting transmit. | |
| #define | CC1101_SEND_RETRIES (4u) |
| Retries in case ACK is not received. | |
| #define | MY_CC1101_SEND_TIMEOUT_MS (500ul) |
| How long to wait for an ACK. | |
| #define | MY_CC1101_ACK_SEND_DELAY_MS 5 |
| #define | MY_CC1101_CSN_TIMEOUT_MS (2ul) |
| CSN to SO low timeout. | |
| #define | CC1101_RETRY_TIMEOUT_MS (1000ul) |
| #define | CC1101_WRITE_SINGLE 0x00 |
| #define | CC1101_WRITE_BURST 0x40 |
| #define | CC1101_READ_SINGLE 0x80 |
| #define | CC1101_READ_BURST 0xC0 |
| #define | CC1101_HEADER_LEN sizeof(cc1101_header_t) |
| Size header inside payload. | |
| #define | CC1101_MAX_PAYLOAD_LEN (CC1101_MAX_PACKET_LEN - CC1101_HEADER_LEN) |
| Max payload length. | |
| #define | CC1101_PACKET_HEADER_VERSION (1u) |
| CC1101 packet header version. | |
| #define | CC1101_MIN_PACKET_HEADER_VERSION (1u) |
| Minimal CC1101 packet header version. | |
Typedefs | |
| typedef enum cc1101PowerLevel_e | cc1101_powerLevel_t |
| typedef uint16_t | cc1101_sequenceNumber_t |
| Sequence number data type. | |
| typedef int8_t | cc1101_RSSI_t |
| RSSI data type. | |
| typedef uint8_t | cc1101_LQI_t |
| LQI data type. | |
| typedef uint8_t | cc1101_status_t |
| Chip status byte. | |
Enumerations | |
| enum | cc1101PowerLevel_e { CC1101_POWER_0 = 0x0, CC1101_POWER_1 = 0x1, CC1101_POWER_2 = 0x2, CC1101_POWER_3 = 0x3, CC1101_POWER_4 = 0x4, CC1101_POWER_5 = 0x5, CC1101_POWER_6 = 0x6, CC1101_POWER_7 = 0x7, CC1101_POWER_AUTO = 0xff } |
| enum | cc1101_radioModes_t { CC1101_MODE_SLEEP = 0x00, CC1101_MODE_IDLE, CC1101_MODE_FS, CC1101_MODE_TX, CC1101_MODE_RX, CC1101_MODE_CCA } |
| CC1101 operation Modes. More... | |