COSA
An Object-Oriented Platform for Arduino Programming
CC1101 Class Reference

#include <CC1101.hh>

Inheritance diagram for CC1101:
Inheritance graph
Collaboration diagram for CC1101:
Collaboration graph

Classes

union  header_t
 
class  IRQPin
 
union  recv_status_t
 
union  status_t
 

Public Member Functions

 CC1101 (uint16_t net, uint8_t dev, Board::DigitalPin csn=Board::D10, Board::ExternalInterruptPin irq=Board::EXT0)
 
virtual bool begin (const void *config=NULL)
 
virtual bool end ()
 
virtual int send (uint8_t dest, uint8_t port, const iovec_t *vec)
 
virtual int send (uint8_t dest, uint8_t port, const void *buf, size_t len)
 
virtual int recv (uint8_t &src, uint8_t &port, void *buf, size_t len, uint32_t ms=0L)
 
virtual void powerdown ()
 
virtual void wakeup_on_radio ()
 
virtual void output_power_level (int8_t dBm)
 
virtual int input_power_level ()
 
virtual int link_quality_indicator ()
 
uint8_t channel () const
 
void channel (uint8_t channel)
 
int16_t network_address () const
 
uint8_t device_address () const
 
void address (int16_t net, uint8_t dev)
 
virtual void powerup ()
 
virtual bool available ()
 
virtual bool room ()
 
virtual int broadcast (uint8_t port, const iovec_t *vec)
 
virtual int broadcast (uint8_t port, const void *buf, size_t len)
 
virtual bool is_broadcast ()
 

Static Public Attributes

static const size_t DEVICE_PAYLOAD_MAX = 64
 
static const size_t PAYLOAD_MAX = DEVICE_PAYLOAD_MAX - 4
 
static const uint8_t BROADCAST = 0x00
 

Protected Types

enum  Config {
  IOCFG2 = 0x00, IOCFG1 = 0x01, IOCFG0 = 0x02, FIFOTH = 0x03,
  SYNC1 = 0x04, SYNC0 = 0x05, PKTLEN = 0x06, PKTCTR = 0x07,
  PKTCTRL0 = 0x08, ADDR = 0x09, CHANNR = 0x0A, FSCTRL1 = 0x0B,
  FSCTRL0 = 0x0C, FREQ2 = 0x0D, FREQ1 = 0x0E, FREQ0 = 0x0F,
  MDMCFG4 = 0x10, MDMCFG3 = 0x11, MDMCFG2 = 0x12, MDMCFG1 = 0x13,
  MDMCFG0 = 0x14, DEVIATN = 0x15, MCSM2 = 0x16, MCSM1 = 0x17,
  MCSM0 = 0x18, FOCCFG = 0x19, BSCFG = 0x1A, AGCCTRL2 = 0x1B,
  AGCCTRL1 = 0x1C, AGCCTRL0 = 0x1D, WOREVT1 = 0x1E, WOREVT0 = 0x1F,
  WORCTRL = 0x20, FREND1 = 0x21, FREND0 = 0x22, FSCAL3 = 0x23,
  FSCAL2 = 0x24, FSCAL1 = 0x25, FSCAL0 = 0x26, RCCTRL1 = 0x27,
  RCCTRL0 = 0x28, FSTEST = 0x29, PTEST = 0x2A, AGCTEST = 0x2B,
  TEST2 = 0x2C, TEST1 = 0x2D, TEST0 = 0x2E, CONFIG_MAX = 0x29
}
 
enum  Data { PATABLE = 0x3E, TXFIFO = 0x3F, RXFIFO = 0x3F }
 
enum  Status {
  PARTNUM = 0x30, VERSION = 0x31, FREQEST = 0x32, LQI = 0x33,
  RSSI = 0x34, MARCSTATE = 0x35, WORTIME1 = 0x36, WORTIME0 = 0x37,
  PKTSTATUS = 0x38, VCO = 0x39, TXBYTES = 0x3A, RXBYTES = 0x3B,
  BYTES_MASK = 0x7f, FIFO_MASK = 0x80, RCCTRL1_STATUS = 0x3C, RCCTRL0_STATUS = 0x3D,
  STATUS_MAX = 0x0E
}
 
enum  Command {
  SRES = 0x30, SFSTXON = 0x31, SXOFF = 0x32, SCAL = 0x33,
  SRX = 0x34, STX = 0x35, SIDLE = 0x36, SAFC = 0x37,
  SWOR = 0x38, SPWD = 0x39, SFRX = 0x3A, SFTX = 0x3B,
  SWORRST = 0x3C, SNOP = 0x3D
}
 
enum  Mode {
  IDLE_MODE = 0, RX_MODE, TX_MODE, FSTXON_MODE,
  CALIBRATION_MODE, SETTLING_MODE, RXFIFO_OVERFLOW_MODE, TXFIFO_UNDERFLOW_MODE
}
 
enum  State {
  SLEEP_STATE = 0x00, IDLE_STATE = 0x01, XOFF_STATE = 0x02, VCOON_MC_STATE = 0x03,
  REGON_MC_STATE = 0x04, MANCAL_STATE = 0x05, VCOON_STATE = 0x06, REGON_STATE = 0x07,
  STARTCAL_STATE = 0x08, BWBOOST_STATE = 0x09, FS_LOCK_STATE = 0x0A, IFADCON_STATE = 0x0B,
  ENDCAL_STATE = 0x0C, RX_STATE = 0x0D, RX_END_STATE = 0x0E, RX_RST_STATE = 0x0F,
  TXRX_SWITCH_STATE = 0x10, RXFIFO_OVERFLOW_STATE = 0x11, FSTXON_STATE = 0x12, TX_STATE = 0x13,
  TX_END_STATE = 0x14, RXTX_SWITCH_STATE = 0x15, TXFIFO_UNDERFLOW_STATE = 0x16
}
 

Protected Member Functions

uint8_t read (uint8_t reg)
 
void read (uint8_t reg, void *buf, size_t count)
 
void write (uint8_t reg, uint8_t value)
 
void write (uint8_t reg, const void *buf, size_t count)
 
void write_P (uint8_t reg, const uint8_t *buf, size_t count)
 
uint8_t read (Config reg)
 
void read (Config reg, void *buf, size_t count)
 
void write (Config reg, uint8_t value)
 
void write (Config reg, const void *buf, size_t count)
 
void write_P (Config reg, const uint8_t *buf, size_t count)
 
uint8_t read (Data reg)
 
void read (Data reg, void *buf, size_t count)
 
void write (Data reg, uint8_t value)
 
void write (Data reg, const void *buf, size_t count)
 
void write_P (Data reg, const uint8_t *buf, size_t count)
 
uint8_t read (Status reg)
 
void strobe (Command cmd)
 
status_t status () const
 
status_t read_status (uint8_t fifo=1)
 
void await (Mode mode)
 
State read_marc_state ()
 

Protected Attributes

uint8_t m_channel
 Current channel (device dependent. More...
 
addr_t m_addr
 Current network and device address. More...
 
volatile bool m_avail
 Message available. May be set by ISR. More...
 
uint8_t m_dest
 Latest message destination device address. More...
 

Static Protected Attributes

static const size_t PATABLE_MAX = 8
 

Private Member Functions

void set_clock (Clock rate)
 
void set_clock (uint32_t freq)
 

Static Private Member Functions

static Clock clock (uint32_t freq)
 
static Clock cycle (uint16_t ns)
 

Private Attributes

Driverm_next
 List of drivers. More...
 
OutputPin m_cs
 Device chip select pin. More...
 
Pulse m_pulse
 Chip select pulse width. More...
 
uint8_t m_spcr
 SPI/SPCR hardware control register setting. More...
 
uint8_t m_spsr
 SPI/SPSR hardware status register. More...
 

Detailed Description

Cosa Device Driver for Texas Instruments CC1101, Low-Power Sub-1 GHz RF Transceiver. Note that this device requires data in big endian order.

Circuit

This is the pin-out for the CC1101 module which is compatible with the NRF24L01 module. CC1101 is a low voltage device (3V3) and signals require level shifter (74HC4050 or 10K resistor). Special care for MISO as this signal is multi-drop.

+------------+
(GND)---------------1-|GND |
(3V3)---------------2-|VCC |
3-|CDO0 |
(D10)------[ > ]----4-|CSN |
(D13/SCK)--[ > ]----5-|SCK |
(D11/MOSI)-[ > ]----6-|MOSI |
(D12/MISO)-[ < ]----7-|MISO/GDO1 |
(D2/EXT0)--[ < ]----8-|GDO2 |
+------------+

References

  1. Product Description, SWRS061H, Rev. H, 2012-10-09 http://www.ti.com/lit/ds/symlink/cc1101.pdf

Definition at line 59 of file CC1101.hh.

Member Enumeration Documentation

enum CC1101::Command
protected

Command Strobes (Table 42, pp. 67).

Enumerator
SRES 

Reset chip.

SFSTXON 

Enable and calibrate frequency synthesizer.

SXOFF 

Turn off crystal oscillator.

SCAL 

Calibrate frequency synthesizer.

SRX 

Enable RX.

STX 

Enable TX.

SIDLE 

Exit RX/TX.

SAFC 

AFC adjustment of the frequency synthesizer.

SWOR 

Start automatic Wake-on-Radio.

SPWD 

Power down mode when CSn goes high.

SFRX 

Flush the RX FIFO buffer.

SFTX 

Flush the TX FIFO buffer.

SWORRST 

Reset real time clock.

SNOP 

No operation.

Definition at line 513 of file CC1101.hh.

enum CC1101::Config
protected

Configuration Registers (Table 43, pp. 68).

Enumerator
IOCFG2 

GDO2 output pin configuration.

IOCFG1 

GDO1 output pin configuration.

IOCFG0 

GDO0 output pin configuration.

FIFOTH 

RX FIFO and TX FIFO thresholds.

SYNC1 

Sync word, high byte.

SYNC0 

Sync word, low byte.

PKTLEN 

Packet length.

PKTCTR 

Packet automation control.

PKTCTRL0 

Packet automation control.

ADDR 

Device address.

CHANNR 

Channel number.

FSCTRL1 

Frequency synthesizer control.

FSCTRL0 

Frequency synthesizer control.

FREQ2 

Frequency control word, high byte.

FREQ1 

Frequency control word, middle byte.

FREQ0 

Frequency control word, low byte.

MDMCFG4 

Modem configuration.

MDMCFG3 

Modem configuration.

MDMCFG2 

Modem configuration.

MDMCFG1 

Modem configuration.

MDMCFG0 

Modem configuration.

DEVIATN 

Modem deviation setting.

MCSM2 

Main Radio Cntrl State Machine config.

MCSM1 

Main Radio Cntrl State Machine config.

MCSM0 

Main Radio Cntrl State Machine config.

FOCCFG 

Frequency Offset Compensation config.

BSCFG 

Bit Synchronization configuration.

AGCCTRL2 

AGC control.

AGCCTRL1 

AGC control.

AGCCTRL0 

AGC control.

WOREVT1 

High byte Event 0 timeout.

WOREVT0 

Low byte Event 0 timeout.

WORCTRL 

Wake On Radio control.

FREND1 

Front end RX configuration.

FREND0 

Front end TX configuration.

FSCAL3 

Frequency synthesizer calibration.

FSCAL2 

Frequency synthesizer calibration.

FSCAL1 

Frequency synthesizer calibration.

FSCAL0 

Frequency synthesizer calibration.

RCCTRL1 

RC oscillator configuration.

RCCTRL0 

RC oscillator configuration.

FSTEST 

Frequency synthesizer cal control.

PTEST 

Production test.

AGCTEST 

AGC test.

TEST2 

Various test settings.

TEST1 

Various test settings.

TEST0 

Various test settings.

CONFIG_MAX 

Number of configuration registers.

Definition at line 302 of file CC1101.hh.

enum CC1101::Data
protected

Data access registers (chap. FIFO and PATABLE Access, pp. 32-33).

Enumerator
PATABLE 

PA control table.

TXFIFO 

Transmitter FIFO.

RXFIFO 

Receiver FIFO.

Definition at line 411 of file CC1101.hh.

enum CC1101::Mode
protected

Status Byte Summary (Table 23, pp. 31).

Enumerator
IDLE_MODE 

Main State Machine Mode.

Idle state.

RX_MODE 

Receiver mode.

TX_MODE 

Transmit mode.

FSTXON_MODE 

Fast Transmit ready.

CALIBRATION_MODE 

Frequency synthesizer calibration running.

SETTLING_MODE 

PLL is settling.

RXFIFO_OVERFLOW_MODE 

RX FIFO has overflowed.

TXFIFO_UNDERFLOW_MODE 

TX FIFO har underflowed.

Definition at line 540 of file CC1101.hh.

enum CC1101::State
protected

Main Radio Control State Machine State (pp. 93).

Enumerator
SLEEP_STATE 

State (Figure 24, pp 50).

SLEEP.

IDLE_STATE 

IDLE.

XOFF_STATE 

XOFF.

VCOON_MC_STATE 

MANCAL.

REGON_MC_STATE 

MANCAL.

MANCAL_STATE 

MANCAL.

VCOON_STATE 

FS_WAKEUP.

REGON_STATE 

FS_WAKEUP.

STARTCAL_STATE 

CALIBRATE.

BWBOOST_STATE 

SETTLING.

FS_LOCK_STATE 

SETTLING.

IFADCON_STATE 

SETTLING.

ENDCAL_STATE 

CALIBRATE.

RX_STATE 

RX.

RX_END_STATE 

RX.

RX_RST_STATE 

RX.

TXRX_SWITCH_STATE 

TXRX_SETTLING.

RXFIFO_OVERFLOW_STATE 

RXFIFO_OVERFLOW.

FSTXON_STATE 

FSTXON.

TX_STATE 

TX.

TX_END_STATE 

TX.

RXTX_SWITCH_STATE 

RXTX_SETTLING.

TXFIFO_UNDERFLOW_STATE 

TXFIFO_UNDERFLOW.

Definition at line 598 of file CC1101.hh.

enum CC1101::Status
protected

Status Registers (Table 44, pp. 69).

Enumerator
PARTNUM 

Part number.

VERSION 

Current version number.

FREQEST 

Frequency offset estimate.

LQI 

Demodulator estimate for link quality.

RSSI 

Received signal strength indication.

MARCSTATE 

Control state machine state.

WORTIME1 

High byte of WOR timer.

WORTIME0 

Low byte of WOR timer.

PKTSTATUS 

Current GDOx status and packet status.

VCO 

Current setting from PLL cal module.

TXBYTES 

Underflow and # of bytes in TXFIFO.

RXBYTES 

Overflow and # of bytes in RXFIFO.

BYTES_MASK 

Mask # bytes.

FIFO_MASK 

Mask fifo state.

RCCTRL1_STATUS 

Last RC oscillator calibration result.

RCCTRL0_STATUS 

Last RC oscillator calibration result.

STATUS_MAX 

Number of status registers.

Definition at line 478 of file CC1101.hh.

Constructor & Destructor Documentation

CC1101::CC1101 ( uint16_t  net,
uint8_t  dev,
Board::DigitalPin  csn = Board::D10,
Board::ExternalInterruptPin  irq = Board::EXT0 
)

Construct C1101 device driver with given network and device address. Connected to SPI bus and given chip select pin. Default pins are Arduino Nano IO Shield for CC1101 module are D10 chip select and D2/EXT0 external interrupt pin (TinyX4/Mega/Standard).

Parameters
[in]netnetwork address.
[in]devdevice address.
[in]csnchip select pin (Default D2/D10/D53).
[in]irqinterrupt pin (Default EXT0/EXT0/EXT4).

Definition at line 99 of file CC1101.cpp.

Member Function Documentation

void Wireless::Driver::address ( int16_t  net,
uint8_t  dev 
)
inlineinherited

Set network and device address. Do not use the broadcast address(0). Should be used before calling begin().

Parameters
[in]netnetwork address.
[in]devdevice address.

Definition at line 106 of file Wireless.hh.

virtual bool Wireless::Driver::available ( )
inlinevirtualinherited

Return true(1) if a message is available otherwise false(0).

Returns
bool.

Reimplemented in VWI, and NRF24L01P.

Definition at line 165 of file Wireless.hh.

void CC1101::await ( Mode  mode)
protected

Await given mode.

Parameters
[in]modeto await.

Definition at line 121 of file CC1101.cpp.

bool CC1101::begin ( const void *  config = NULL)
virtual

Start and configure C1101 device driver. The configuration must set GDO2 to assert on received message. This device pin is assumed to be connected the device driver interrupt pin (EXTn). Return true(1) if successful othewise false(0).

Parameters
[in]configconfiguration vector (default NULL)
Returns
bool.

Implements Wireless::Driver.

Definition at line 127 of file CC1101.cpp.

virtual int Wireless::Driver::broadcast ( uint8_t  port,
const iovec_t vec 
)
inlinevirtualinherited

Broadcast message in given null terminated io vector. Returns number of bytes sent if successful otherwise a negative error code.

Parameters
[in]portdevice port (or message type).
[in]vecnull termianted io vector.
Returns
number of bytes send or negative error code.

Definition at line 220 of file Wireless.hh.

virtual int Wireless::Driver::broadcast ( uint8_t  port,
const void *  buf,
size_t  len 
)
inlinevirtualinherited

Boardcast message in given buffer, with given number of bytes. Returns number of bytes sent if successful otherwise a negative error code.

Parameters
[in]portdevice port (or message type).
[in]bufbuffer to transmit.
[in]lennumber of bytes in buffer.
Returns
number of bytes send or negative error code.

Definition at line 235 of file Wireless.hh.

uint8_t Wireless::Driver::channel ( ) const
inlineinherited

Get driver channel.

Returns
channel.

Definition at line 77 of file Wireless.hh.

void Wireless::Driver::channel ( uint8_t  channel)
inlineinherited

Set device transmission channel. Should be used before calling begin().

Parameters
[in]channel.

Definition at line 117 of file Wireless.hh.

uint8_t Wireless::Driver::device_address ( ) const
inlineinherited

Get driver device address.

Returns
device address.

Definition at line 95 of file Wireless.hh.

bool CC1101::end ( )
virtual

Shutdown the device driver. Return true(1) if successful otherwise false(0).

Returns
bool.

Reimplemented from Wireless::Driver.

Definition at line 164 of file CC1101.cpp.

int CC1101::input_power_level ( )
virtual

Return estimated input power level (dBm) from latest successful message received.

Reimplemented from Wireless::Driver.

Definition at line 298 of file CC1101.cpp.

virtual bool Wireless::Driver::is_broadcast ( )
inlinevirtualinherited

Return true(1) if the latest received message was a broadcast otherwise false(0).

Definition at line 262 of file Wireless.hh.

virtual int CC1101::link_quality_indicator ( )
inlinevirtual

Return link quality indicator from latest successful receive message. Lower level is better quality.

Reimplemented from Wireless::Driver.

Definition at line 194 of file CC1101.hh.

int16_t Wireless::Driver::network_address ( ) const
inlineinherited

Get driver network address.

Returns
network address.

Definition at line 86 of file Wireless.hh.

void CC1101::output_power_level ( int8_t  dBm)
virtual

Set output power level (-30..10 dBm)

Parameters
[in]dBm.

Reimplemented from Wireless::Driver.

Definition at line 279 of file CC1101.cpp.

void CC1101::powerdown ( )
virtual

Set device in power down mode.

Reimplemented from Wireless::Driver.

Definition at line 265 of file CC1101.cpp.

virtual void Wireless::Driver::powerup ( )
inlinevirtualinherited

Set device in power up mode.

Reimplemented in VWI, and NRF24L01P.

Definition at line 146 of file Wireless.hh.

uint8_t CC1101::read ( uint8_t  reg)
inlineprotected

Read single register value and status. Access status with status(). Returns register value.

Parameters
[in]regregister address.
Returns
value.

Definition at line 242 of file CC1101.hh.

void CC1101::read ( uint8_t  reg,
void *  buf,
size_t  count 
)
inlineprotected

Read multiple register values into given buffer. Access status with status().

Parameters
[in]regstart register address.
[in]bufbuffer to store register values.
[in]countsize of buffer and number of registers to read.

Definition at line 256 of file CC1101.hh.

uint8_t CC1101::read ( Config  reg)
inlineprotected

Read single configuration register value.

Parameters
[in]regregister address.
Returns
value

Definition at line 358 of file CC1101.hh.

void CC1101::read ( Config  reg,
void *  buf,
size_t  count 
)
inlineprotected

Read given number of configuration register values into given buffer.

Parameters
[in]regstart register address.
[in]bufbuffer to store register values.
[in]countsize of buffer and number of registers to read.

Definition at line 370 of file CC1101.hh.

uint8_t CC1101::read ( Data  reg)
inlineprotected

Read value from data register.

Parameters
[in]regdata register address.
Returns
value

Definition at line 427 of file CC1101.hh.

void CC1101::read ( Data  reg,
void *  buf,
size_t  count 
)
inlineprotected

Read data register values into given buffer.

Parameters
[in]regregister address.
[in]bufbuffer to store register values.
[in]countsize of buffer and number of registers to read.

Definition at line 438 of file CC1101.hh.

uint8_t CC1101::read ( Status  reg)
inlineprotected

Read single status register value.

Parameters
[in]regregister address.
Returns
value

Definition at line 503 of file CC1101.hh.

State CC1101::read_marc_state ( )
inlineprotected

Read Main Radio Control State Machine State.

Returns
state

Definition at line 628 of file CC1101.hh.

status_t CC1101::read_status ( uint8_t  fifo = 1)
inlineprotected

Read status byte.

Parameters
[in]fifostatus (0 = write, 1 = read)
Returns
status

Definition at line 579 of file CC1101.hh.

int CC1101::recv ( uint8_t &  src,
uint8_t &  port,
void *  buf,
size_t  len,
uint32_t  ms = 0L 
)
virtual

Receive message and store into given buffer with given maximum length. The source network address is returned in the parameter src. Returns error code(-2) if no message is available and/or a timeout occured. Returns error code(-1) if the buffer size if to small for incoming message or if the receiver fifo has overflowed. Otherwise the actual number of received bytes is returned

Parameters
[out]srcsource network address.
[out]portdevice port (or message type).
[in]bufbuffer to store incoming message.
[in]lenmaximum number of bytes to receive.
[in]msmaximum time out period (Default blocking(0L)).
Returns
number of bytes received or negative error code.

Implements Wireless::Driver.

Definition at line 211 of file CC1101.cpp.

virtual bool Wireless::Driver::room ( )
inlinevirtualinherited

Return true(1) if there is room to send on the device otherwise false(0).

Returns
bool.

Definition at line 176 of file Wireless.hh.

int CC1101::send ( uint8_t  dest,
uint8_t  port,
const iovec_t vec 
)
virtual

Send message in given null terminated io vector. Returns number of bytes sent. Returns error code(-1) if number of bytes is greater than PAYLOAD_MAX. Return error code(-2) if fails to set transmit mode.

Parameters
[in]destdestination network address.
[in]portdevice port (or message type).
[in]vecnull termianted io vector.
Returns
number of bytes send or negative error code.

Implements Wireless::Driver.

Definition at line 173 of file CC1101.cpp.

int CC1101::send ( uint8_t  dest,
uint8_t  port,
const void *  buf,
size_t  len 
)
virtual

Send message in given buffer, with given number of bytes. Returns number of bytes sent. Returns error code(-1) if number of bytes is greater than PAYLOAD_MAX. Return error code(-2) if fails to set transmit mode. Note that port numbers (128 and higher are reserved for system protocols).

Parameters
[in]destdestination network address.
[in]portdevice port (or message type).
[in]bufbuffer to transmit.
[in]lennumber of bytes in buffer.
Returns
number of bytes send or negative error code.

Reimplemented from Wireless::Driver.

Definition at line 201 of file CC1101.cpp.

status_t CC1101::status ( ) const
inlineprotected

Get latest transaction status.

Returns
status

Definition at line 569 of file CC1101.hh.

void CC1101::strobe ( Command  cmd)
protected

Issue given command to device. Check documentation for required timing delay per command.

Parameters
[in]cmdcommand.

Definition at line 110 of file CC1101.cpp.

void CC1101::wakeup_on_radio ( )
virtual

Set device in wakeup on radio mode.

Reimplemented from Wireless::Driver.

Definition at line 272 of file CC1101.cpp.

void CC1101::write ( uint8_t  reg,
uint8_t  value 
)
inlineprotected

Write single register value. Access status with status().

Parameters
[in]regregister address.
[in]valueto write to register.

Definition at line 267 of file CC1101.hh.

void CC1101::write ( uint8_t  reg,
const void *  buf,
size_t  count 
)
inlineprotected

Write multiple register values from given buffer. Access status with status().

Parameters
[in]regstart register address.
[in]bufbuffer with new register values.
[in]countsize of buffer and number of registers to read.

Definition at line 280 of file CC1101.hh.

void CC1101::write ( Config  reg,
uint8_t  value 
)
inlineprotected

Write single configuration register value.

Parameters
[in]regregister address.
[in]valueto write to register.

Definition at line 380 of file CC1101.hh.

void CC1101::write ( Config  reg,
const void *  buf,
size_t  count 
)
inlineprotected

Write given number of configuration register values from given buffer.

Parameters
[in]regstart register address.
[in]bufbuffer with new register values.
[in]countsize of buffer and number of registers to read.

Definition at line 391 of file CC1101.hh.

void CC1101::write ( Data  reg,
uint8_t  value 
)
inlineprotected

Write value to data register.

Parameters
[in]regregister address.
[in]valueto write to register.

Definition at line 448 of file CC1101.hh.

void CC1101::write ( Data  reg,
const void *  buf,
size_t  count 
)
inlineprotected

Write given buffer to data register (Table/FIFO).

Parameters
[in]regdata register address.
[in]bufbuffer with data.
[in]countsize of buffer and number of bytes to write.

Definition at line 459 of file CC1101.hh.

void CC1101::write_P ( uint8_t  reg,
const uint8_t *  buf,
size_t  count 
)
inlineprotected

Write multiple register values from given buffer in program memory. Access status with status().

Parameters
[in]regstart register address.
[in]bufbuffer in program memory with new register values.
[in]countsize of buffer (and number of registers) to write

Definition at line 293 of file CC1101.hh.

void CC1101::write_P ( Config  reg,
const uint8_t *  buf,
size_t  count 
)
inlineprotected

Write multiple configuration register values from given buffer in program memory.

Parameters
[in]regstart register address.
[in]bufbuffer in program memory with new register values.
[in]countsize of buffer (and number of registers) to write

Definition at line 403 of file CC1101.hh.

void CC1101::write_P ( Data  reg,
const uint8_t *  buf,
size_t  count 
)
inlineprotected

Write fiven buffer in program memory to data register.

Parameters
[in]regdata register address.
[in]bufbuffer in program memory with new data to write.
[in]countsize of buffer.

Definition at line 470 of file CC1101.hh.

Member Data Documentation

const uint8_t Wireless::Driver::BROADCAST = 0x00
staticinherited

Broadcast device address.

Definition at line 58 of file Wireless.hh.

const size_t CC1101::DEVICE_PAYLOAD_MAX = 64
static

Maximum size of payload on device.

Definition at line 64 of file CC1101.hh.

addr_t Wireless::Driver::m_addr
protectedinherited

Current network and device address.

Definition at line 299 of file Wireless.hh.

volatile bool Wireless::Driver::m_avail
protectedinherited

Message available. May be set by ISR.

Definition at line 300 of file Wireless.hh.

uint8_t Wireless::Driver::m_channel
protectedinherited

Current channel (device dependent.

Definition at line 298 of file Wireless.hh.

uint8_t Wireless::Driver::m_dest
protectedinherited

Latest message destination device address.

Definition at line 301 of file Wireless.hh.

const size_t CC1101::PATABLE_MAX = 8
staticprotected

Maximum size of PA table.

Definition at line 420 of file CC1101.hh.

const size_t CC1101::PAYLOAD_MAX = DEVICE_PAYLOAD_MAX - 4
static

Maximum size of payload. The device allows 64 bytes payload. The length and destination addressing will require two bytes, source address one byte, and port one byte. This gives a payload max of 64 - 4 = 60.

Definition at line 72 of file CC1101.hh.


The documentation for this class was generated from the following files: