components/base_components/mdf_mics/include/mdf_common.h
/**
 * @brief  convert mac from string format to binary
 */
@brief  convert mac from string format to binary
@brief convert mac from string format to binary
static inline uint8_t *str2mac(const char *mac_str, uint8_t *mac)
{
    uint32_t mac_data[6] = {0};
    sscanf(mac_str, "%02x%02x%02x%02x%02x%02x",
           mac_data, mac_data + 1, mac_data + 2, mac_data + 3, mac_data + 4, mac_data + 5);
    for (int i = 0; i < 6; i++) {
        mac[i] = mac_data[i];
    }
    return mac;
}
static inline uint8_t * str2mac ( const char * mac_str , uint8_t * mac ) { uint32_t mac_data [ 6 ] = { 0 } ; sscanf ( mac_str , " " , mac_data , mac_data + 1 , mac_data + 2 , mac_data + 3 , mac_data + 4 , mac_data + 5 ) ; for ( int i = 0 ; i < 6 ; i ++ ) { mac [ i ] = mac_data [ i ] ; } return mac ; }
@brief  convert mac from string format to binary
@brief convert mac from string format to binary