|
AM263Px MCU+ SDK
10.01.00
|
|
Go to the documentation of this file.
60 #ifndef UB_STRUTILS_H_
61 #define UB_STRUTILS_H_
82 void ub_hexdump(
bool console,
bool debug,
unsigned char *buf,
int size,
int addr);
uint8_t ub_bytearray6_t[6]
6-byte binary array
Definition: ub_strutils.h:70
ub_bytearray8_t ub_streamid_t
8-byte binary array is used for Stream ID
Definition: ub_strutils.h:68
uint8_t * ub_ssid2bsid(const char *ssid, ub_streamid_t bsid)
convert a string type stream id('XX:XX:XX:XX:XX:XX:XX:XX' format) to a binary type stream id
char * ub_bmac2smac(ub_macaddr_t bmac, char *smac)
convert a binary type mac address to a string type mac address('XX:XX:XX:XX:XX:XX' format)
void ub_hexdump(bool console, bool debug, unsigned char *buf, int size, int addr)
dump out data in hex format to the console
int ub_hexstr2barray(const char *bstr, uint8_t *bytes, const char delim, int len)
convert array of 2-digit hex string
int ub_find_space(const char *astr, int maxn)
look for space charcter and return the number of passed characters
int ub_strncpy(char *dest, const char *src, int maxlen)
copy a string
int ub_command_line_parser(char *line, char *argv[], int maxargc)
parse a command line string and make argc,argv[] for main function,
ub_bytearray6_t ub_macaddr_t
6-byte binary array is used for MAC Address
Definition: ub_strutils.h:71
uint8_t * ub_smac2bmac(const char *smac, ub_macaddr_t bmac)
convert a string type mac address('XX:XX:XX:XX:XX:XX' format) to a binary type mac address.
int ub_str2bytearray(uint8_t *dest, const char *input, uint8_t base)
convert a string type byte array('01,00,1e,00,00,03,....02,00,01') to a byte array
uint8_t ub_bytearray8_t[8]
8-byte binary array
Definition: ub_strutils.h:67
char * ub_bytearray2str(char *dest, const unsigned char *bytes, int len)
convert a byte array to a string type byte array('01,00,1e,00,00,03,....02,00,01')
int ub_find_nospace(const char *astr, int maxn)
look for non space charcter and return the number of passed characters
char * ub_bsid2ssid(ub_streamid_t bsid, char *ssid)
convert a binary type stream id to a string type stream id ('XX:XX:XX:XX:XX:XX:XX:XX' format)
void ub_byte2hexstr(uint8_t a, char *astr)
convert a byte to 2-digit hex string