max31723: added bus parameter to constructor

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Mihai Tudor Panu 2017-04-10 18:37:08 -07:00
parent d004aa68b7
commit 7e5f6e9856
4 changed files with 7 additions and 4 deletions

View File

@ -156,6 +156,9 @@ compatibility between releases:
a SPI bus number. This is now the first parameter, the number of LEDs on the
strip is now the last (3rd) parameter instead.
* **max31723** The constructor for this driver was updated to allow specifying
a SPI bus number. This is now the first parameter, CS pin second.
# v1.1.0
* **i2clcd/jhd1313m1/lcm1602** LCD devices supported by the i2clcd module are

View File

@ -44,7 +44,7 @@ int
main(int argc, char **argv)
{
//! [Interesting]
sensor = new upm::MAX31723(7);
sensor = new upm::MAX31723(0, 7);
usleep (1000000);
while (!doWork) {

View File

@ -31,7 +31,7 @@
using namespace upm;
MAX31723::MAX31723 (int csn) : m_spi(0), m_csnPinCtx(csn) {
MAX31723::MAX31723 (int bus, int csn) : m_spi(bus), m_csnPinCtx(csn) {
mraa::Result error = mraa::SUCCESS;
m_name = "MAX31723";

View File

@ -72,10 +72,10 @@ class MAX31723 {
/**
* Instantiates an MAX31723 object
*
* @param bus Number of the used bus
* @param bus Number of the SPI bus used
* @param csn Chip select (slave select) pin to use
*/
MAX31723 (int csn);
MAX31723 (int bus, int csn);
/**
* MAXDS3231M object destructor; basically, it closes the I2C connection.