Struct cc1101_rust::config::TXConfig[][src]

#[repr(C)]
pub struct TXConfig { /* fields omitted */ }
Expand description

Configuration values specific to transmit

Implementations

Create a new transmit configuration

See CommonConfig for valid argument values.

TX power is specified in dBm. Valid values can be found in TI DN013

Frequency must be close to 315/433/868/915Mhz

Example
let config = TXConfig::new(433.92, Modulation::OOK, 1.0, 0.1, None, None)?;

Get the common configuration elements

Get a mutable reference to the common configuration elements

Create a new transmit configuration using a TX power specified as a raw CC1101 PATABLE byte.

Frequency can be any valid value.

See CommonConfig for valid argument values.

Example
let mut config = TXConfig::new_raw(433.92, Modulation::OOK, 1.0, 0x60, None, None)?;

Set the TX power to a value in dBm.

Configured frequency must be within 1Mhz of 315/433/868/915Mhz

Get the TX power in dBm.

Configured frequency must be within 1MHz of 315/433/868/915Mhz

Set the TX power to a raw value which will be set in the devices PATABLE

Get the TX power as raw value from the devices PATABLE

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.