[package] name = "ina219" description = "INA219 current/power monitor driver" edition = "2021" version = "0.2.0" keywords = ["ina219", "driver", "i2c", "current", "no_std"] repository = "https://github.com/scttnlsn/ina219" authors = ["Scott Nelson ", "Tamme Dittrich "] license = "MIT/Apache-2.0" [features] default = ["sync", "async", "paranoid"] # Provide a blocking driver implementation sync = ["dep:embedded-hal"] # Provide an async driver implementation async = ["dep:embedded-hal-async"] # Use the standard library and impl std::error::Error on all error types std = [] # Perform checks to see if the INA219 reacts as expected such as: # - All measurements are in the configured ranges # - We can read back the configuration we have written without any changes # # This does cause some overhead such as memorizing the last written configuration and performing more actions on the # bus. So it can be disabled by setting `default-features = false`. paranoid = [] # When using a raspberry pi and the I2C transaction an operation not supported error is raised. This feature replaces # the usage of a single transaction with multiple write_read operations. no_transaction = [] [[example]] name = "calibration" required-features = ["sync", "std", "no_transaction"] [[example]] name = "custom-calibration" required-features = ["sync", "std", "no_transaction"] [[example]] name = "full-config" required-features = ["sync", "std", "no_transaction"] [[example]] name = "minimal" required-features = ["sync", "std", "no_transaction"] [[example]] name = "triggered" required-features = ["sync", "std", "no_transaction"] [dependencies] embedded-hal = { version = "1.0.0", optional = true } embedded-hal-async = { version = "1.0.0", optional = true } [dev-dependencies] linux-embedded-hal = "0.4.0" embedded-hal-mock = { version = "0.10.0", default-features = false, features = ["eh1"] }