Mac.hpp
1 //
2 // Created by xiong on 2022/6/11.
3 //
4 
5 #ifndef EMX_Mac_HPP
6 #define EMX_Mac_HPP
7 
8 #include "EmxCore.hpp"
9 
10 namespace Emx {
16  class Mac {
17  public:
18  Mac() {
19  memset(m_mac, 0, sizeof(m_mac));
20  }
21 
22  static const int MaxMacSize = 32;
23 
29 
34  char *Get() { return m_mac; }
35 
41  ErrCodeE Set(const char *mac);
42 
43  private:
44  char m_mac[MaxMacSize];
45  };
46 
48 }
49 
50 #endif //EMX_Mac_HPP
提供设备MAC地址的获取与配置
Definition: Mac.hpp:16
ErrCodeE Set(const char *mac)
设置MAC地址
static const int MaxMacSize
MAC字符串最大大小
Definition: Mac.hpp:22
Mac()
Definition: Mac.hpp:18
char * Get()
获取MAC地址
Definition: Mac.hpp:34
ErrCodeE Load()
从flash中加载参数
ErrCodeE
错误码定义
Definition: EmxTypeDef.hpp:29
Definition: EmxGpio.hpp:10