Compare commits
1 Commits
ecf2203796
...
eaef3d27e6
Author | SHA1 | Date | |
---|---|---|---|
eaef3d27e6 |
@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Changed
|
||||
|
||||
- Bugfix for I2C `TimingCfg::reg`
|
||||
- Simplified UART error handling. All APIs are now infallible because writing to a FIFO or
|
||||
reading from a FIFO never fails. Users can either poll errors using `Rx::poll_errors` or
|
||||
`Uart::poll_rx_errors` / `UartBase::poll_rx_errors`, or detect errors using the provided
|
||||
@ -251,7 +252,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Added basic test binary in form of an example
|
||||
- README with basic instructions how to set up own binary crate
|
||||
|
||||
[unreleased]: https://github.com/rust-embedded/cortex-ar/compare/cortex-ar-v0.1.0...HEAD
|
||||
[unreleased]: https://egit.irs.uni-stuttgart.de/rust/va108xx-rs/compare/va108xx-hal-v0.11.0...HEAD
|
||||
[v0.11.0]: https://egit.irs.uni-stuttgart.de/rust/va108xx-rs/compare/va108xx-hal-v0.10.0...va108xx-hal-v0.11.0
|
||||
[v0.10.0]: https://egit.irs.uni-stuttgart.de/rust/va108xx-rs/compare/va108xx-hal-v0.9.0...va108xx-hal-v0.10.0
|
||||
[v0.9.0]: https://egit.irs.uni-stuttgart.de/rust/va108xx-rs/compare/va108xx-hal-v0.8.0...va108xx-hal-v0.9.0
|
||||
|
@ -198,13 +198,13 @@ impl TimingCfg {
|
||||
}
|
||||
|
||||
pub fn reg(&self) -> u32 {
|
||||
(self.tbuf as u32) << 28
|
||||
| (self.thd_sta as u32) << 24
|
||||
| (self.tsu_sta as u32) << 20
|
||||
| (self.tsu_sto as u32) << 16
|
||||
| (self.tlow as u32) << 12
|
||||
| (self.thigh as u32) << 8
|
||||
| (self.tf as u32) << 4
|
||||
((self.tbuf as u32) << 28)
|
||||
| ((self.thd_sta as u32) << 24)
|
||||
| ((self.tsu_sta as u32) << 20)
|
||||
| ((self.tsu_sto as u32) << 16)
|
||||
| ((self.tlow as u32) << 12)
|
||||
| ((self.thigh as u32) << 8)
|
||||
| ((self.tf as u32) << 4)
|
||||
| (self.tr as u32)
|
||||
}
|
||||
}
|
||||
@ -376,7 +376,7 @@ impl<I2c: Instance> I2cBase<I2c> {
|
||||
if let Some(max_words) = max_words {
|
||||
self.i2c
|
||||
.s0_maxwords()
|
||||
.write(|w| unsafe { w.bits(1 << 31 | max_words as u32) });
|
||||
.write(|w| unsafe { w.bits((1 << 31) | max_words as u32) });
|
||||
}
|
||||
let (addr, addr_mode_mask) = Self::unwrap_addr(sl_cfg.addr);
|
||||
// The first bit is the read/write value. Normally, both read and write are matched
|
||||
@ -437,7 +437,7 @@ impl<I2c: Instance> I2cBase<I2c> {
|
||||
let clk_div = self.calc_clk_div(speed_mode)?;
|
||||
self.i2c
|
||||
.clkscale()
|
||||
.write(|w| unsafe { w.bits((speed_mode as u32) << 31 | clk_div as u32) });
|
||||
.write(|w| unsafe { w.bits(((speed_mode as u32) << 31) | clk_div as u32) });
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user