text: #include "make.hpp"
  #include "esp_system.h"
  #include "esp_timer.h"
  
  #include <cstring>
  
  config* make_config(config& cfg) noexcept
  {
  	mesh_cfg_t cfg_;
  	wifi_ap_record_t ap;
  
  	esp_mesh_get_config(&cfg_);
  	esp_wifi_sta_get_ap_info(&ap);
  
  	esp_read_mac(cfg.mac_ap.addr, ESP_MAC_WIFI_SOFTAP);
  	std::memcpy(&cfg.net_id.addr, &cfg_.mesh_id.addr, 6);
  	cfg.channel_config = cfg_.channel;
  	cfg.channel_conn = ap.primary;
  
  	return &cfg;
  }
  