All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
le_hex.h File Reference

Go to the source code of this file.

Functions

int32_t le_hex_StringToBinary (const char *stringPtr, uint32_t stringLength, uint8_t *binaryPtr, uint32_t binarySize)
 
int32_t le_hex_BinaryToString (const uint8_t *binaryPtr, uint32_t binarySize, char *stringPtr, uint32_t stringSize)
 

Detailed Description

Legato Hex string API include file.

Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.

Function Documentation

int32_t le_hex_BinaryToString ( const uint8_t *  binaryPtr,
uint32_t  binarySize,
char *  stringPtr,
uint32_t  stringSize 
)

Converts binary to hex string format.

Returns
size of hex string, if < 0 it has failed
Parameters
[in]binaryPtrbinary array to convert
[in]binarySizesize of binary array
[out]stringPtrhex string array, terminated with '\0'.
[in]stringSizesize of string array
int32_t le_hex_StringToBinary ( const char *  stringPtr,
uint32_t  stringLength,
uint8_t *  binaryPtr,
uint32_t  binarySize 
)

Converts hex string to binary format.

Returns
size of binary, if < 0 it has failed
Parameters
[in]stringPtrstring to convert, terminated with '\0'.
[in]stringLengthstring length
[out]binaryPtrbinary result
[in]binarySizesize of the binary table