#[repr(C)]pub struct I2C_Config {
pub ch: u8,
pub frequency_khz: u32,
pub device_address: u8,
pub stop_flag: u8,
pub timeout_threshold: u32,
pub rx_length: u32,
}Expand description
I2cConfig I2Cポートの初期化、データ送信・受信の際に必要となる設定情報を格納する構造体です。
Fields§
§ch: u8!< 継承先の機器がつながっているポート番号
frequency_khz: u32!< I2Cクロックの周波数 単位:kHz
device_address: u8!< 継承先の機器のアドレス
stop_flag: u8!< 最後にSTOPを送るか否かを選択 0->送らない,それ以外->送る
timeout_threshold: u32!< この値を超えるとタイムアウトエラーとなる 単位:カウント数(ユーザー依存) TODO: 時刻にするか要検討
rx_length: u32!< I2C通信における受信データ長 単位: Byte
Trait Implementations§
Source§impl Clone for I2C_Config
impl Clone for I2C_Config
Source§fn clone(&self) -> I2C_Config
fn clone(&self) -> I2C_Config
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 I2C_Config
impl Debug for I2C_Config
impl Copy for I2C_Config
Auto Trait Implementations§
impl Freeze for I2C_Config
impl RefUnwindSafe for I2C_Config
impl Send for I2C_Config
impl Sync for I2C_Config
impl Unpin for I2C_Config
impl UnwindSafe for I2C_Config
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