COSA
An Object-Oriented Platform for Arduino Programming
CC1101::header_t Union Reference

#include <CC1101.hh>

Collaboration diagram for CC1101::header_t:
Collaboration graph

Public Member Functions

 header_t (uint8_t addr, uint8_t is_burst, uint8_t is_read)
 
 operator uint8_t ()
 

Public Attributes

uint8_t as_uint8
 8-bit representation. More...
 
struct {
   uint8_t   reg:6
 < Bit-field representation (little endian). More...
 
   uint8_t   burst:1
 Burst(1) or Single(0) byte mode. More...
 
   uint8_t   rw:1
 Read(1) or Write(0). More...
 
}; 
 

Detailed Description

Transaction header (pp. 29). Note 16-bit configuration variables are read/written in big endian order (MSB first) and require swapping.

Definition at line 204 of file CC1101.hh.

Constructor & Destructor Documentation

CC1101::header_t::header_t ( uint8_t  addr,
uint8_t  is_burst,
uint8_t  is_read 
)
inline

Construct header with given register address, burst and read flag.

Parameters
[in]addrregister address.
[in]is_burstflag for burst mode.
[in]is_readflag for read mode.

Definition at line 219 of file CC1101.hh.

Member Function Documentation

CC1101::header_t::operator uint8_t ( )
inline

Cast header bit-field to byte.

Returns
byte representation.

Definition at line 230 of file CC1101.hh.

Member Data Documentation

struct { ... }
uint8_t CC1101::header_t::as_uint8

8-bit representation.

Definition at line 205 of file CC1101.hh.

uint8_t CC1101::header_t::burst

Burst(1) or Single(0) byte mode.

Definition at line 208 of file CC1101.hh.

uint8_t CC1101::header_t::reg

< Bit-field representation (little endian).

Register address.

Definition at line 207 of file CC1101.hh.

uint8_t CC1101::header_t::rw

Read(1) or Write(0).

Definition at line 209 of file CC1101.hh.


The documentation for this union was generated from the following file: