Private
Public Access
2
0

mraa: add accessor functions to return counts of spi, pwm, gpio and adcs

Signed-off-by: Tapani Utriainen <tapani@technexion.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Tapani Utriainen
2017-05-19 22:13:46 +08:00
committed by Brendan Le Foll
parent b7e8d96945
commit d6edf76680
2 changed files with 64 additions and 0 deletions

View File

@@ -759,6 +759,42 @@ mraa_get_uart_count(void)
return plat->uart_dev_count;
}
int
mraa_get_spi_count(void)
{
if (plat == NULL) {
return -1;
}
return plat->spi_bus_count;
}
int
mraa_get_pwm_count(void)
{
if (plat == NULL) {
return -1;
}
return plat->pwm_dev_count;
}
int
mraa_get_gpio_count(void)
{
if (plat == NULL) {
return -1;
}
return plat->gpio_count;
}
int
mraa_get_aio_count(void)
{
if (plat == NULL) {
return -1;
}
return plat->aio_count;
}
int
mraa_get_i2c_bus_count()
{