api: Now returns MRAA_SUCCESS if platform is already initialized
To ensure backwards comptability MRAA_ERROR_PLATFORM_ALREADY_INITIALISED remains as member of mraa_result_t but now has same code as MRAA_SUCCESS Signed-off-by: Henry Bruce <henry.bruce@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
85a848960a
commit
51c60a0ac4
@@ -64,9 +64,7 @@ typedef unsigned int mraa_boolean_t;
|
||||
*
|
||||
* Detects running platform and attempts to use included pinmap, this is run on
|
||||
* module/library init/load but is handy to rerun to check board initialised
|
||||
* correctly. MRAA_SUCCESS inidicates correct (first time) initialisation
|
||||
* whilst MRAA_ERROR_PLATFORM_ALREADY_INITIALISED indicates the board is
|
||||
* already initialised correctly
|
||||
* correctly. MRAA_SUCCESS inidicates correct initialisation.
|
||||
*
|
||||
* @return Result of operation
|
||||
*/
|
||||
|
||||
@@ -46,9 +46,7 @@ namespace mraa
|
||||
*
|
||||
* Detects running platform and attempts to use included pinmap, this is run on
|
||||
* module/library init/load but is handy to rerun to check board initialised
|
||||
* correctly. MRAA_SUCCESS inidicates correct (first time) initialisation
|
||||
* whilst MRAA_ERROR_PLATFORM_ALREADY_INITIALISED indicates the board is
|
||||
* already initialised correctly
|
||||
* correctly. mraa::SUCCESS inidicates correct initialisation.
|
||||
*
|
||||
* @return Result of operation
|
||||
*/
|
||||
@@ -260,7 +258,7 @@ isSubPlatformId(int pin_or_bus_id)
|
||||
*
|
||||
* @return int sub platform pin or bus number
|
||||
*/
|
||||
inline int
|
||||
inline int
|
||||
getSubPlatformId(int pin_or_bus_index)
|
||||
{
|
||||
return mraa_get_sub_platform_id(pin_or_bus_index);
|
||||
|
||||
@@ -203,7 +203,7 @@ typedef enum {
|
||||
MRAA_ERROR_NO_DATA_AVAILABLE = 9, /**< No data available */
|
||||
MRAA_ERROR_INVALID_PLATFORM = 10, /**< Platform not recognised */
|
||||
MRAA_ERROR_PLATFORM_NOT_INITIALISED = 11, /**< Board information not initialised */
|
||||
MRAA_ERROR_PLATFORM_ALREADY_INITIALISED = 12, /**< Board is already initialised */
|
||||
MRAA_ERROR_PLATFORM_ALREADY_INITIALISED = 0, /**< Board is already initialised, same as MRAA_SUCESS */
|
||||
|
||||
MRAA_ERROR_UNSPECIFIED = 99 /**< Unknown Error */
|
||||
} mraa_result_t;
|
||||
|
||||
@@ -195,7 +195,7 @@ typedef enum {
|
||||
ERROR_NO_DATA_AVAILABLE = 9, /**< No data available */
|
||||
ERROR_INVALID_PLATFORM = 10, /**< Platform not recognised */
|
||||
ERROR_PLATFORM_NOT_INITIALISED = 11, /**< Board information not initialised */
|
||||
ERROR_PLATFORM_ALREADY_INITIALISED = 12, /**< Board is already initialised */
|
||||
ERROR_PLATFORM_ALREADY_INITIALISED = 0, /**< Board is already initialised, same as SUCCESS */
|
||||
|
||||
ERROR_UNSPECIFIED = 99 /**< Unknown Error */
|
||||
} Result;
|
||||
|
||||
Reference in New Issue
Block a user