stm32_ota/SYSTEM/MAC/mac.h

24 lines
806 B
C
Raw Normal View History

2023-12-15 06:28:06 +00:00
#ifndef __MACx_H
#define __MACx_H
#include "stm32f10x.h"
#define VERSION_LEN 11 //<2F><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Nov 24 2014<31><34>
#define MAC_BYTES_LEN 24 //<2F>豸MACID<49><44><EFBFBD>ֽڳ<D6BD><DAB3>ȡ<EFBFBD>31FFD405524E353728902251<35><31>
typedef enum
{
HEXMACID = 0, //16<31><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
STRMACID = 1 //<2F>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>ʽ
}MACIDFORMAT_e ; //MACID<49><44>ʽ
typedef union
{
uint32_t macValue[3] ; //<2F><><EFBFBD><EFBFBD>U32
uint8_t macBytes[MAC_BYTES_LEN/2] ; //<2F><><EFBFBD><EFBFBD>U8
}MACID_u ; //<2F><><EFBFBD><EFBFBD><E5B9B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Կ<EFBFBD><D4BF>ٽ<EFBFBD>uint32_t<5F><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊuint8_t<5F><74><EFBFBD><EFBFBD><E9A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>
extern void Query_AppVersion( char *version) ; //<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B1BE>
extern void GetDeviceMacAddress(uint8_t *macAddressNBytes, MACIDFORMAT_e eMacIdFormat) ; //<2F><>ȡSTM32Ψһʶ<D2BB><CAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>豸MACID
#endif