Loading...
Searching...
No Matches

Interface definition for the CC1100/CC1101 driver. More...

Detailed Description

#include <stdint.h>
#include "cc1xxx_common.h"
#include "mutex.h"
#include "net/gnrc/nettype.h"
#include "net/netdev.h"
#include "periph/adc.h"
#include "periph/gpio.h"
#include "periph/spi.h"
+ Include dependency graph for cc110x.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cc110x_patable_t
 Structure that holds the PATABLE, which allows to configure the 8 available output power levels using a magic number for each level. More...
 
struct  cc110x_config_t
 Configuration of the transceiver to use. More...
 
struct  cc110x_chanmap_t
 Structure to hold mapping between virtual and physical channel numbers. More...
 
struct  cc110x_params_t
 Structure holding all parameter for driver initialization. More...
 
struct  cc110x_fs_calibration_t
 Structure holding the calibration data of the frequency synthesizer. More...
 
struct  cc110x_framebuf_t
 Buffer to temporary store incoming/outgoing packet. More...
 
struct  cc110x_t
 Device descriptor for CC1100/CC1101 transceivers. More...
 

Macros

#define CC110X_MAX_FRAME_SIZE   0xFF
 Length of a layer 2 frame.
 
#define CC110X_MAX_PAYLOAD_SIZE   (CC110X_MAX_FRAME_SIZE - CC1XXX_HEADER_SIZE)
 Maximum (layer 2) payload size supported by the driver.
 
#define CC110X_MAX_CHANNELS   8
 Maximum number of channels supported by the driver.
 
#define CC110X_DEFAULT_PROTOCOL   (GNRC_NETTYPE_SIXLOWPAN)
 Default protocol for data that is coming in.
 
#define CONFIG_CC110X_DEFAULT_CHANNEL   (0U)
 The default channel to set up after initializing the device.
 

Enumerations

enum  cc110x_state_t {
  CC110X_STATE_IDLE = 0x00 , CC110X_STATE_FRAME_READY = 0x08 , CC110X_STATE_OFF = 0x10 , CC110X_STATE_RX_MODE = 0x01 ,
  CC110X_STATE_RECEIVING = 0x09 , CC110X_STATE_TX_MODE = 0x02 , CC110X_STATE_TX_COMPLETING = 0x0A , CC110X_STATE_FSTXON = 0x03 ,
  CC110X_STATE_CALIBRATE = 0x04 , CC110X_STATE_SETTLING = 0x05 , CC110X_STATE_RXFIFO_OVERFLOW = 0x06 , CC110X_STATE_TXFIFO_UNDERFLOW = 0x07
}
 The state of the CC1100/CC1101 transceiver. More...
 
enum  cc110x_tx_power_t {
  CC110X_TX_POWER_MINUS_30_DBM , CC110X_TX_POWER_MINUS_20_DBM , CC110X_TX_POWER_MINUS_15_DBM , CC110X_TX_POWER_MINUS_10_DBM ,
  CC110X_TX_POWER_0_DBM , CC110X_TX_POWER_PLUS_5_DBM , CC110X_TX_POWER_PLUS_7_DBM , CC110X_TX_POWER_PLUS_10_DBM ,
  CC110X_TX_POWER_NUMOF
}
 Enumeration over the possible TX power settings the driver offers. More...
 

Functions

int cc110x_setup (cc110x_t *dev, const cc110x_params_t *params, uint8_t index)
 Setup the CC1100/CC1101 driver, but perform no initialization.
 
int cc110x_apply_config (cc110x_t *dev, const cc110x_config_t *conf, const cc110x_chanmap_t *chanmap, uint8_t channel)
 Apply the given configuration and the given channel map and performs a recalibration.
 
int cc110x_full_calibration (cc110x_t *dev)
 Perform a calibration of the frequency generator for each supported channel.
 
int cc110x_set_channel (cc110x_t *dev, uint8_t channel)
 Hops to the specified channel.
 
int cc110x_set_tx_power (cc110x_t *dev, cc110x_tx_power_t power)
 Set the TX power to the specified value.
 
int cc110x_wakeup (cc110x_t *dev)
 Wakes the transceiver from SLEEP mode and enters RX mode.
 
void cc110x_sleep (cc110x_t *dev)
 Sets the transceiver into SLEEP mode.