#[repr(C)]pub struct BaudRateChangeRequest { /* private fields */ }Expand description
Setting Baud Rate (Optional)
An optional feature available on selected versions of firmware is the ability to perform a “Fast Serial Download”. To support this feature, the serial port settings need to be adjusted prior to downloading packets. The serial port settings shall be reverted back to the original values after the last packet has been acknowledged by the device.
| STX | LEN | CTRL | DATA0 | ETX | CHK |
|---|---|---|---|---|---|
| 0x02 | 0x06 | 0x5n | baud | 0x03 | zz |
| Data0 | Description |
|---|---|
| 0x01 | Baud Rate 9600; Data Bits 8, Parity None; Stop Bit 0ne |
| 0x02 | Baud Rate 19,200; Data Bits 8, Parity None; Stop Bit 0ne |
| 0x03 | Baud Rate 38,400; Data Bits 8, Parity None; Stop Bit 0ne |
| 0x04 | Baud Rate 115,200; Data Bits 8, Parity None; Stop Bit 0ne |
| Other | Reserved |
Warning If the device firmware does not support the fast serial download feature, the device will not respond to the baud rate change request. This means the host will be required to perform the download using the original algorithm.
Implementations§
Source§impl BaudRateChangeRequest
impl BaudRateChangeRequest
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new BaudRateChangeRequest message.
Sourcepub fn baud_rate(&self) -> BaudRate
pub fn baud_rate(&self) -> BaudRate
Gets the BaudRate for the BaudRateChangeRequest.
Sourcepub fn set_baud_rate(&mut self, baud_rate: BaudRate)
pub fn set_baud_rate(&mut self, baud_rate: BaudRate)
Sets the BaudRate for the BaudRateChangeRequest.
Trait Implementations§
Source§impl Clone for BaudRateChangeRequest
impl Clone for BaudRateChangeRequest
Source§fn clone(&self) -> BaudRateChangeRequest
fn clone(&self) -> BaudRateChangeRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BaudRateChangeRequest
impl Debug for BaudRateChangeRequest
Source§impl Default for BaudRateChangeRequest
impl Default for BaudRateChangeRequest
Source§fn default() -> BaudRateChangeRequest
fn default() -> BaudRateChangeRequest
Returns the “default value” for a type. Read more
Source§impl Display for BaudRateChangeRequest
impl Display for BaudRateChangeRequest
Source§impl MessageOps for BaudRateChangeRequest
impl MessageOps for BaudRateChangeRequest
Source§fn set_acknak(&mut self, acknak: AckNak)
fn set_acknak(&mut self, acknak: AckNak)
Set the ACKNAK control field.
Source§fn switch_acknak(&mut self)
fn switch_acknak(&mut self)
Switches the current ACKNAK control field value.
Source§fn device_type(&self) -> DeviceType
fn device_type(&self) -> DeviceType
Get the device type control field.
Source§fn set_device_type(&mut self, device_type: DeviceType)
fn set_device_type(&mut self, device_type: DeviceType)
Set the device type control field
Source§fn message_type(&self) -> MessageType
fn message_type(&self) -> MessageType
Get the message type control field
Source§fn set_message_type(&mut self, message_type: MessageType)
fn set_message_type(&mut self, message_type: MessageType)
Set the message type control field
fn checksum_bytes(&self) -> &[u8] ⓘ
Source§fn calculate_checksum(&mut self) -> u8
fn calculate_checksum(&mut self) -> u8
Calculate the message checksum
Source§fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
Get a mutable reference to the byte buffer
Source§impl PartialEq for BaudRateChangeRequest
impl PartialEq for BaudRateChangeRequest
impl Copy for BaudRateChangeRequest
impl StructuralPartialEq for BaudRateChangeRequest
Auto Trait Implementations§
impl Freeze for BaudRateChangeRequest
impl RefUnwindSafe for BaudRateChangeRequest
impl Send for BaudRateChangeRequest
impl Sync for BaudRateChangeRequest
impl Unpin for BaudRateChangeRequest
impl UnwindSafe for BaudRateChangeRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more