merge net into eth lib; ipv4 owns its IP via ipv4::init/get_ip; drop state struct in favor of eth::get_mac/ipv4::get_ip
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
#include "hardware/watchdog.h"
|
||||
#include "flash.h"
|
||||
#include "dispatch.h"
|
||||
#include "net.h"
|
||||
#include "eth.h"
|
||||
#include "ipv4.h"
|
||||
#include "debug_log.h"
|
||||
|
||||
static boot_reason detected_boot_reason;
|
||||
@@ -34,9 +35,8 @@ std::optional<ResponseInfo> handle_info(const responder&, const RequestInfo&) {
|
||||
pico_unique_board_id_t uid;
|
||||
pico_get_unique_board_id(&uid);
|
||||
std::copy(uid.id, uid.id + 8, resp.board_id.begin());
|
||||
auto& ns = net::get_state();
|
||||
resp.mac = ns.mac;
|
||||
resp.ip = ns.ip;
|
||||
resp.mac = eth::get_mac();
|
||||
resp.ip = ipv4::get_ip();
|
||||
resp.firmware_name = firmware_name;
|
||||
resp.boot = detected_boot_reason;
|
||||
resp.build_epoch = firmware_build_epoch;
|
||||
|
||||
Reference in New Issue
Block a user