mirror of
https://github.com/nkbai/book.git
synced 2026-08-31 19:57:52 +08:00
Fix impl Gpio -> impl GpioConfig`
In the two sections "Peripherals as State Machines" and "Design Contracts" of the "Static Guarantees" chapter, `impl Gpio` was incorrectly used in place of `impl GpioConfig` at one place in each section. This commit fixes that.
This commit is contained in:
@@ -25,7 +25,7 @@ struct GpioConfig {
|
||||
periph: GPIO_CONFIG,
|
||||
}
|
||||
|
||||
impl Gpio {
|
||||
impl GpioConfig {
|
||||
pub fn set_enable(&mut self, is_enabled: bool) {
|
||||
self.periph.modify(|_r, w| {
|
||||
w.enable().set_bit(is_enabled)
|
||||
|
||||
@@ -60,7 +60,7 @@ struct GpioConfig {
|
||||
periph: GPIO_CONFIG,
|
||||
}
|
||||
|
||||
impl Gpio {
|
||||
impl GpioConfig {
|
||||
pub fn set_enable(&mut self, is_enabled: bool) {
|
||||
self.periph.modify(|_r, w| {
|
||||
w.enable().set_bit(is_enabled)
|
||||
|
||||
Reference in New Issue
Block a user