Private
Public Access
2
0

mraa.c: Add mraa_get_platform_version call

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-01-20 15:58:06 +00:00
parent caebb8b1fb
commit bdb5ef66e9
8 changed files with 55 additions and 9 deletions

View File

@@ -142,6 +142,16 @@ mraa_result_t mraa_set_log_level(int level);
*/
char* mraa_get_platform_name();
/**
* Return the platform's versioning info, the information given depends per
* platform and can be NULL. platform_offset has to be given. Do not modify
* this pointer
*
* @param specified platform offset; 0 for main platform, 1 for sub platform
* @return platform's versioning string
*/
const char* mraa_get_platform_version(int platform_offset);
/**
* This function attempts to set the mraa process to a given priority and the
* scheduler to SCHED_RR. Highest * priority is typically 99 and minimum is 0.

View File

@@ -154,6 +154,19 @@ getPlatformName()
return ret_val;
}
/**
* Return platform versioning info. Returns NULL if no info present.
*
* @param optional subplatform identifier
* @return platform versioning info
*/
inline std::string
getPlatformVersion(int platform_offset=MRAA_MAIN_PLATFORM_OFFSET)
{
std::string ret_val(mraa_get_platform_version(platform_offset));
return ret_val;
}
/**
* Return count of physical pins on the running platform
*