aio: move aio setup from core into module
Added additional syslog messages for debugging Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
20
src/mraa.c
20
src/mraa.c
@@ -165,26 +165,6 @@ mraa_setup_mux_mapped(mraa_pin_t meta)
|
||||
return MRAA_SUCCESS;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
mraa_setup_aio(int aio)
|
||||
{
|
||||
if (plat == NULL)
|
||||
return MRAA_PLATFORM_NO_INIT;
|
||||
|
||||
if (aio < 0 || aio > plat->aio_count)
|
||||
return MRAA_NO_SUCH_IO;
|
||||
|
||||
int pin = aio + plat->gpio_count;
|
||||
|
||||
if (plat->pins[pin].capabilites.aio != 1)
|
||||
return MRAA_NO_SUCH_IO;
|
||||
|
||||
if (plat->pins[pin].aio.mux_total > 0)
|
||||
if (mraa_setup_mux_mapped(plat->pins[pin].aio) != MRAA_SUCCESS)
|
||||
return MRAA_NO_SUCH_IO;
|
||||
return plat->pins[pin].aio.pinmap;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
mraa_setup_i2c(int* bus)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user