Skip to content

Commit

Permalink
Misc. fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rland93 committed Mar 11, 2024
1 parent 3bca6a3 commit 37237f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/stm32f411.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ use stm32f4xx_hal::{i2c::I2c1, prelude::*};
#[entry]
fn main() -> ! {
let dp = stm32f4xx_hal::pac::Peripherals::take().unwrap();
let cp = cortex_m::Peripherals::take().unwrap();
let _cp = cortex_m::Peripherals::take().unwrap();

let rcc = dp.RCC.constrain();
let clocks = rcc.cfgr.freeze();

let gpiob = dp.GPIOB.split();
let gpioc = dp.GPIOC.split();
let _gpioc = dp.GPIOC.split(); // for interrupts, when those are implemented

info!("i2c");
let i2c1_scl = gpiob.pb6.into_alternate_open_drain();
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod types;
pub use crate::interface::Addr;
pub use crate::types::{
AccBandwidth, AccConf, AccDataRate, AccPowerConf, AccPowerEnable, AccRange,
AccelerometerConfig, ErrCode, Error, Sensor3DData, Status,
AccelerometerConfig, ErrCode, Error, Sensor3DData,
};

/// BMI088 device object.
Expand Down
12 changes: 6 additions & 6 deletions src/reg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ pub enum AccRegisters {
INT2_IO_CONF = 0x54,
/// Map data ready interrupt to output pin INT1 and/or INT2
INT1_INT2_MAP_DATA = 0x58,
/// Enables the sensor self-test signal, occurring as a steady offset to the
/// sensor output. Note that the self-test needs to be switched off actively
/// by the user (details see 4.6.1).
ACC_SELF_TEST = 0x6D,
// Enables the sensor self-test signal, occurring as a steady offset to the
// sensor output. Note that the self-test needs to be switched off actively
// by the user (details see 4.6.1).
// ACC_SELF_TEST = 0x6D,
/// Switches accelerometer into suspend mode for saving power. In this mode
/// the data acquisition is
ACC_PWR_CONF = 0x7C,
Expand Down Expand Up @@ -66,6 +66,6 @@ pub enum GyroRegisters {
GYRO_INT3_INT4_IO_CONF = 0x16,
/// Map data ready interrupt to output pin INT3 and/or INT4
GYRO_INT3_INT4_IO_MAP = 0x18,
/// Built-in self-test of gyroscope.
GYRO_SELF_TEST = 0x3C,
// Built-in self-test of gyroscope.
// GYRO_SELF_TEST = 0x3C,
}

0 comments on commit 37237f1

Please sign in to comment.