diff options
| author | jrmoulton <[email protected]> | 2024-08-13 12:53:58 -0600 |
|---|---|---|
| committer | jrmoulton <[email protected]> | 2024-08-13 12:53:58 -0600 |
| commit | fc342915e6155dec7bafa3e135da7f37a9a07f5c (patch) | |
| tree | 713574f6c7a43bfcdbf5d1ec8f7de36e6727acf9 /embassy-stm32/src/i2c/mod.rs | |
| parent | bfc162d43755f988c0b4963fc23386273ce02a35 (diff) | |
add stm32 i2c slave example
Diffstat (limited to 'embassy-stm32/src/i2c/mod.rs')
| -rw-r--r-- | embassy-stm32/src/i2c/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-stm32/src/i2c/mod.rs b/embassy-stm32/src/i2c/mod.rs index 94507eb34..2ff21702b 100644 --- a/embassy-stm32/src/i2c/mod.rs +++ b/embassy-stm32/src/i2c/mod.rs | |||
| @@ -70,19 +70,19 @@ pub mod mode { | |||
| 70 | #[derive(Debug, Clone, PartialEq, Eq)] | 70 | #[derive(Debug, Clone, PartialEq, Eq)] |
| 71 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 71 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 72 | /// The command kind to the slave from the master | 72 | /// The command kind to the slave from the master |
| 73 | pub enum CommandKind { | 73 | pub enum SlaveCommandKind { |
| 74 | /// Write to the slave | 74 | /// Write to the slave |
| 75 | SlaveReceive, | 75 | Write, |
| 76 | /// Read from the slave | 76 | /// Read from the slave |
| 77 | SlaveSend, | 77 | Read, |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | #[derive(Debug, Clone, PartialEq, Eq)] | 80 | #[derive(Debug, Clone, PartialEq, Eq)] |
| 81 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 81 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 82 | /// The command kind to the slave from the master and the address that the slave matched | 82 | /// The command kind to the slave from the master and the address that the slave matched |
| 83 | pub struct Command { | 83 | pub struct SlaveCommand { |
| 84 | /// The kind of command | 84 | /// The kind of command |
| 85 | pub kind: CommandKind, | 85 | pub kind: SlaveCommandKind, |
| 86 | /// The address that the slave matched | 86 | /// The address that the slave matched |
| 87 | pub address: Address, | 87 | pub address: Address, |
| 88 | } | 88 | } |
