sarmfsw: SMFSW Toolbox (for ARM & compatible with Arduino platform) 3.7
SMFSW collection of miscellaneous functions & macros (for ARM & compatible with Arduino platform)
Loading...
Searching...
No Matches
arm_inlines_ascii.h File Reference

ASCII code conversion inlines. More...

This graph shows which files directly or indirectly include this file:

Functions

BOOL isLowerCase (const CHAR ascii)
 test for lower case alphabetic char
 
BOOL isUpperCase (const CHAR ascii)
 test for upper case alphabetic char
 
BOOL isAlpha (const CHAR ascii)
 test for alphabetic char
 
BOOL isNum (const CHAR ascii)
 test for numeric char
 
BOOL isAlphaNum (const CHAR ascii)
 test for alphanumeric char
 
CHAR toLowerCase (const CHAR ascii)
 Convert upper case alphabetic char to lower case.
 
CHAR toUpperCase (const CHAR ascii)
 Convert lower case alphabetic char to upper case.
 
CHAR HexToASCII (const BYTE hex)
 Converts hexadecimal value to ASCII.
 
BYTE ASCIIToHex (const CHAR ascii)
 Converts ASCII char to hexadecimal.
 
DWORD strDecToInt (const CHAR *const pASCII, const BYTE len)
 ASCII decimal string to 32bit unsigned integer.
 
DWORD strHexToInt (const CHAR *const pASCII, const BYTE len)
 ASCII hexadecimal string to 32bit unsigned integer.
 

Detailed Description

ASCII code conversion inlines.

Author
SMFSW

Function Documentation

◆ ASCIIToHex()

BYTE ASCIIToHex ( const CHAR ascii)
inline

Converts ASCII char to hexadecimal.

Parameters
[in]ascii- ASCII char to convert
Returns
Hexadecimal value
Here is the caller graph for this function:

◆ HexToASCII()

CHAR HexToASCII ( const BYTE hex)
inline

Converts hexadecimal value to ASCII.

Parameters
[in]hex- Hexadecimal value to convert
Returns
ASCII char

◆ isAlpha()

BOOL isAlpha ( const CHAR ascii)
inline

test for alphabetic char

Parameters
[in]ascii- ASCII char to check
Returns
true if alphabetic, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAlphaNum()

BOOL isAlphaNum ( const CHAR ascii)
inline

test for alphanumeric char

Parameters
[in]ascii- ASCII char to check
Returns
true if alpha/numeric, false otherwise
Here is the call graph for this function:

◆ isLowerCase()

BOOL isLowerCase ( const CHAR ascii)
inline

test for lower case alphabetic char

Parameters
[in]ascii- ASCII char to check
Returns
true if lower case, false otherwise
Warning
You probably should ensure ascii is alphabetic char first (false will be always returned in case non alphabetic char)
Here is the caller graph for this function:

◆ isNum()

BOOL isNum ( const CHAR ascii)
inline

test for numeric char

Parameters
[in]ascii- ASCII char to check
Returns
true if numeric, false otherwise
Here is the caller graph for this function:

◆ isUpperCase()

BOOL isUpperCase ( const CHAR ascii)
inline

test for upper case alphabetic char

Parameters
[in]ascii- ASCII char to check
Returns
true if upper case, false otherwise
Warning
You probably should ensure ascii is alphabetic char first (false will be always returned in case non alphabetic char)
Here is the caller graph for this function:

◆ strDecToInt()

DWORD strDecToInt ( const CHAR *const pASCII,
const BYTE len )
inline

ASCII decimal string to 32bit unsigned integer.

Parameters
[in]pASCII- pointer to ASCII string
[in]len- ASCII string length (max shall be 10, and may overflow return value when 10)
Returns
Unsigned integer value
Here is the call graph for this function:

◆ strHexToInt()

DWORD strHexToInt ( const CHAR *const pASCII,
const BYTE len )
inline

ASCII hexadecimal string to 32bit unsigned integer.

Parameters
[in]pASCII- pointer to ASCII string
[in]len- ASCII string length (max shall be 8)
Returns
Unsigned integer value
Here is the call graph for this function:

◆ toLowerCase()

CHAR toLowerCase ( const CHAR ascii)
inline

Convert upper case alphabetic char to lower case.

Parameters
[in]ascii- ASCII char to convert
Returns
Lower case char, same value otherwise
Warning
You probably should ensure ascii is alphabetic char first
Here is the call graph for this function:

◆ toUpperCase()

CHAR toUpperCase ( const CHAR ascii)
inline

Convert lower case alphabetic char to upper case.

Parameters
[in]ascii- ASCII char to convert
Returns
Upper case char, same value otherwise
Warning
You probably should ensure ascii is alphabetic char first
Here is the call graph for this function: