diff options
| author | Dirk Stolle <[email protected]> | 2023-05-08 23:25:01 +0200 |
|---|---|---|
| committer | Dirk Stolle <[email protected]> | 2023-05-08 23:25:01 +0200 |
| commit | 0584312ef0324d2ac67dbb9517176fabf628eec9 (patch) | |
| tree | 1b6e67474474fad99e7035a8e8898f4fb78656ad /embassy-stm32 | |
| parent | d0703f83dbe0099c3dca0c912d873365a2188018 (diff) | |
Fix some typos
Diffstat (limited to 'embassy-stm32')
| -rw-r--r-- | embassy-stm32/src/time_driver.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/usart/mod.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/embassy-stm32/src/time_driver.rs b/embassy-stm32/src/time_driver.rs index 8e84570a4..d45c90dd8 100644 --- a/embassy-stm32/src/time_driver.rs +++ b/embassy-stm32/src/time_driver.rs | |||
| @@ -250,7 +250,7 @@ impl RtcDriver { | |||
| 250 | // Call after clearing alarm, so the callback can set another alarm. | 250 | // Call after clearing alarm, so the callback can set another alarm. |
| 251 | 251 | ||
| 252 | // safety: | 252 | // safety: |
| 253 | // - we can ignore the possiblity of `f` being unset (null) because of the safety contract of `allocate_alarm`. | 253 | // - we can ignore the possibility of `f` being unset (null) because of the safety contract of `allocate_alarm`. |
| 254 | // - other than that we only store valid function pointers into alarm.callback | 254 | // - other than that we only store valid function pointers into alarm.callback |
| 255 | let f: fn(*mut ()) = unsafe { mem::transmute(alarm.callback.get()) }; | 255 | let f: fn(*mut ()) = unsafe { mem::transmute(alarm.callback.get()) }; |
| 256 | f(alarm.ctx.get()); | 256 | f(alarm.ctx.get()); |
diff --git a/embassy-stm32/src/usart/mod.rs b/embassy-stm32/src/usart/mod.rs index dbce668c2..e946762af 100644 --- a/embassy-stm32/src/usart/mod.rs +++ b/embassy-stm32/src/usart/mod.rs | |||
| @@ -112,7 +112,7 @@ pub struct UartRx<'d, T: BasicInstance, RxDma = NoDma> { | |||
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | impl<'d, T: BasicInstance, TxDma> UartTx<'d, T, TxDma> { | 114 | impl<'d, T: BasicInstance, TxDma> UartTx<'d, T, TxDma> { |
| 115 | /// usefull if you only want Uart Tx. It saves 1 pin and consumes a little less power | 115 | /// Useful if you only want Uart Tx. It saves 1 pin and consumes a little less power. |
| 116 | pub fn new( | 116 | pub fn new( |
| 117 | peri: impl Peripheral<P = T> + 'd, | 117 | peri: impl Peripheral<P = T> + 'd, |
| 118 | tx: impl Peripheral<P = impl TxPin<T>> + 'd, | 118 | tx: impl Peripheral<P = impl TxPin<T>> + 'd, |
| @@ -210,7 +210,7 @@ impl<'d, T: BasicInstance, TxDma> UartTx<'d, T, TxDma> { | |||
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | impl<'d, T: BasicInstance, RxDma> UartRx<'d, T, RxDma> { | 212 | impl<'d, T: BasicInstance, RxDma> UartRx<'d, T, RxDma> { |
| 213 | /// usefull if you only want Uart Rx. It saves 1 pin and consumes a little less power | 213 | /// Useful if you only want Uart Rx. It saves 1 pin and consumes a little less power. |
| 214 | pub fn new( | 214 | pub fn new( |
| 215 | peri: impl Peripheral<P = T> + 'd, | 215 | peri: impl Peripheral<P = T> + 'd, |
| 216 | irq: impl Peripheral<P = T::Interrupt> + 'd, | 216 | irq: impl Peripheral<P = T::Interrupt> + 'd, |
| @@ -757,7 +757,7 @@ impl<'d, T: BasicInstance, TxDma, RxDma> Uart<'d, T, TxDma, RxDma> { | |||
| 757 | } | 757 | } |
| 758 | 758 | ||
| 759 | /// Split the Uart into a transmitter and receiver, which is | 759 | /// Split the Uart into a transmitter and receiver, which is |
| 760 | /// particuarly useful when having two tasks correlating to | 760 | /// particularly useful when having two tasks correlating to |
| 761 | /// transmitting and receiving. | 761 | /// transmitting and receiving. |
| 762 | pub fn split(self) -> (UartTx<'d, T, TxDma>, UartRx<'d, T, RxDma>) { | 762 | pub fn split(self) -> (UartTx<'d, T, TxDma>, UartRx<'d, T, RxDma>) { |
| 763 | (self.tx, self.rx) | 763 | (self.tx, self.rx) |
