nRF Connect SDK API 0.1.0
|
uint8_t string_conversion_gsm7bit_to_ascii | ( | const uint8_t * | data, |
uint8_t * | out_data, | ||
uint8_t | num_char, | ||
bool | packed | ||
) |
Convert GSM 7 bit Default Alphabet characters to ASCII characters.
gsm7bit_to_ascii_table conversion table is used. Perform also unpacking of the 7 bit string before conversion, if caller indicates that the string is packed.
References: 3GPP TS 23.038 chapter 6.2.1: GSM 7 bit Default Alphabet
[in] | data | Pointer to array of characters to be converted. No null termination. |
[out] | out_data | Pointer to buffer for the converted string. Shall have allocation of at least "num_char" bytes. Note that this function does not add null termination at the end of the string. It should be done by caller, when needed. (In that case it could be useful to actually allocate num_char+1 bytes here.) |
[in] | num_char | Number of 7-bit characters to be unpacked, including possible escape codes. Also indicates maximum allowed number of characters to be stored to output buffer by this function. |
[in] | packed | True if the 7bit string is packed, i.e. has to be unpacked before conversion. |