Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: ADS1100.cpp
- Revision:
- 2:7ee26d7e2997
- Parent:
- 1:ccf2f06f72d0
- Child:
- 3:7c8d1aa80a9d
--- a/ADS1100.cpp Thu May 31 04:31:51 2018 +0000 +++ b/ADS1100.cpp Wed Jun 20 07:05:53 2018 +0000 @@ -7,15 +7,15 @@ #include "mbed.h" #include "ADS1100.h" -ADS1100::ADS1100 (PinName sda, PinName scl, uint8_t addr) : _i2c(sda, scl) { +ADS1100::ADS1100 (PinName sda, PinName scl, char addr) : _i2c(sda, scl) { init(addr); } -ADS1100::ADS1100 (I2C& p_i2c, uint8_t addr) : _i2c(p_i2c) { +ADS1100::ADS1100 (I2C& p_i2c, char addr) : _i2c(p_i2c) { init(addr); } -void init(uint8_t addr) { - address = ADS1100_ADDR << 3 + addr // make address +void ADS1100::init(char addr) { + address = ADS1100_ADDR << 3 + addr; // make address config.bit.ST=0; // must be 0 config.bit.RE=0; // must be 0