Reduce struct visibility where not required

This commit is contained in:
marcelbuesing 2018-05-31 12:10:34 +02:00
parent ba7a1dd09f
commit 650db10d69
No known key found for this signature in database
GPG key ID: E51C4F8A2B7FF43E
3 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,5 @@
use CalibData;
use core::time::Duration;
use CalibData;
pub struct Calc {}

View file

@ -118,6 +118,7 @@ pub enum Error<R, W> {
BoundaryCheckFailure(&'static str),
}
/// Abbreviates `std::result::Result` type
pub type Result<T, R, W> = result::Result<T, Error<R, W>>;
///
@ -181,6 +182,7 @@ impl Default for I2CAddress {
}
}
/// Calibration data used during initalization
#[derive(Debug, Default, Copy)]
#[repr(C)]
pub struct CalibData {
@ -218,6 +220,7 @@ impl Clone for CalibData {
}
}
/// Contains read sensors values e.g. temperature, pressure, humidity etc.
#[derive(Debug, Default, Copy)]
#[repr(C)]
pub struct FieldData {
@ -260,8 +263,7 @@ impl FieldData {
}
}
/// aka new_fields - BME680_NEW_DATA_MSK
///
/// Shows if new data is available
#[derive(Debug)]
pub enum FieldDataCondition {
///
@ -274,7 +276,7 @@ pub enum FieldDataCondition {
Unchanged,
}
pub struct I2CUtil {}
struct I2CUtil {}
impl I2CUtil {
pub fn read_byte<I2C>(
@ -315,6 +317,7 @@ impl I2CUtil {
}
}
/// Driver for the BME680 environmental sensor
#[repr(C)]
pub struct Bme680_dev<I2C, D> {
i2c: I2C,

View file

@ -116,6 +116,8 @@ impl Clone for SensorSettings {
}
bitflags! {
/// Flags that determine what settings are to be set and what settings are to be read.
/// Use the `SettingsBuilder` to initialize an instance when setting the settings.
#[derive(Default)]
pub struct DesiredSensorSettings: u16 {
/// To set temperature oversampling
@ -158,6 +160,7 @@ pub struct SettingsBuilder {
sensor_settings: SensorSettings,
}
/// Tuple of desired sensor settings flags and sensor settings
pub type Settings = (SensorSettings, DesiredSensorSettings);
impl SettingsBuilder {