|
发表于 2015-5-22 09:31:38
沙发
是的,具体实现如下:
- void get_mac_addr(uint8_t *p_mac_addr)
- {
- uint8_t mac_addr[6];
- nvds_tag_len_t add_lenth = 6;
- if (NVDS_OK != nvds_get(NVDS_TAG_BD_ADDRESS, &add_lenth, mac_addr))
- {
- // NVDS is empty, use default name
- p_mac_addr[0] = 0x08;
- p_mac_addr[1] = 0x7C;
- p_mac_addr[2] = 0xBE;
- p_mac_addr[3] = 0x00;
- p_mac_addr[4] = 0x00;
- p_mac_addr[5] = 0x00;
- }
- else
- {
- for ( uint8_t i = 6; i >0;)
- {
- i--;
- p_mac_addr[5-i]= mac_addr[i];
- }
- }
- }
复制代码 |
|