api: Fixes for missing mraa methods.
This commit includes a set of small fixes flushed out from the google
unit tests.
* Fixed missing implementations of mraa_get_*_count methods.
* Fix for NULL string
* Fix for MOCK platform C++ define.
* Switched (void) -> () function definitions for consistency.
Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
10
src/mraa.c
10
src/mraa.c
@@ -775,7 +775,7 @@ mraa_get_platform_version(int platform_offset)
|
||||
}
|
||||
|
||||
int
|
||||
mraa_get_uart_count(void)
|
||||
mraa_get_uart_count()
|
||||
{
|
||||
if (plat == NULL) {
|
||||
return -1;
|
||||
@@ -784,7 +784,7 @@ mraa_get_uart_count(void)
|
||||
}
|
||||
|
||||
int
|
||||
mraa_get_spi_count(void)
|
||||
mraa_get_spi_bus_count()
|
||||
{
|
||||
if (plat == NULL) {
|
||||
return -1;
|
||||
@@ -793,7 +793,7 @@ mraa_get_spi_count(void)
|
||||
}
|
||||
|
||||
int
|
||||
mraa_get_pwm_count(void)
|
||||
mraa_get_pwm_count()
|
||||
{
|
||||
if (plat == NULL) {
|
||||
return -1;
|
||||
@@ -802,7 +802,7 @@ mraa_get_pwm_count(void)
|
||||
}
|
||||
|
||||
int
|
||||
mraa_get_gpio_count(void)
|
||||
mraa_get_gpio_count()
|
||||
{
|
||||
if (plat == NULL) {
|
||||
return -1;
|
||||
@@ -811,7 +811,7 @@ mraa_get_gpio_count(void)
|
||||
}
|
||||
|
||||
int
|
||||
mraa_get_aio_count(void)
|
||||
mraa_get_aio_count()
|
||||
{
|
||||
if (plat == NULL) {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user