From 23e871c5bb0270d48af10e675f76ecaf501b44fd Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Thu, 27 Oct 2016 13:37:43 +0000 Subject: [PATCH] mraa_internal.h: Add internal definition for mraa_atoi Signed-off-by: Brendan Le Foll --- include/mraa_internal.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/mraa_internal.h b/include/mraa_internal.h index b50e4ba..c64bf2f 100644 --- a/include/mraa_internal.h +++ b/include/mraa_internal.h @@ -140,6 +140,15 @@ mraa_boolean_t mraa_link_targets(const char* filename, const char* targetname); */ int mraa_find_i2c_bus(const char* devname, int startfrom); +/** + * helper function to wrap strtol for our basic usage + * + * @param string representing int + * @param converted string + * @return Result of the operation + */ +mraa_result_t mraa_atoi(char* intStr, int* value); + #if defined(IMRAA) /** * read Imraa subplatform lock file, caller is responsible to free return