Private
Public Access
2
0

api: Added mraa_get_sub_platform_type()

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Henry Bruce
2015-07-23 14:56:03 -07:00
committed by Brendan Le Foll
parent 30cf8ec560
commit 13118e949b
2 changed files with 17 additions and 0 deletions

View File

@@ -150,6 +150,13 @@ void mraa_result_print(mraa_result_t result);
*/
mraa_platform_t mraa_get_platform_type();
/**
* Get sub platform type, board must be initialised.
*
* @return mraa_platform_t Platform type enum
*/
mraa_platform_t mraa_get_sub_platform_type();
/**
* Get platform pincount, board must be initialised.
*

View File

@@ -305,6 +305,16 @@ mraa_get_platform_type()
return plat->platform_type;
}
mraa_platform_t
mraa_get_sub_platform_type()
{
if (plat == NULL || plat->sub_platform == NULL)
return MRAA_UNKNOWN_PLATFORM;
return plat->sub_platform->platform_type;
}
unsigned int
mraa_adc_raw_bits()
{