mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 00:10:22 +00:00
[ethernet] Remove deprecated get_eth_mac_address_pretty() (#18379)
This commit is contained in:
@@ -159,9 +159,6 @@ class EthernetComponent final : public Component {
|
|||||||
const char *get_use_address() const { return this->use_address_; }
|
const char *get_use_address() const { return this->use_address_; }
|
||||||
void set_use_address(const char *use_address) { this->use_address_ = use_address; }
|
void set_use_address(const char *use_address) { this->use_address_ = use_address; }
|
||||||
void get_eth_mac_address_raw(uint8_t *mac);
|
void get_eth_mac_address_raw(uint8_t *mac);
|
||||||
// Remove before 2026.9.0
|
|
||||||
ESPDEPRECATED("Use get_eth_mac_address_pretty_into_buffer() instead. Removed in 2026.9.0", "2026.3.0")
|
|
||||||
std::string get_eth_mac_address_pretty();
|
|
||||||
const char *get_eth_mac_address_pretty_into_buffer(std::span<char, MAC_ADDRESS_PRETTY_BUFFER_SIZE> buf);
|
const char *get_eth_mac_address_pretty_into_buffer(std::span<char, MAC_ADDRESS_PRETTY_BUFFER_SIZE> buf);
|
||||||
eth_duplex_t get_duplex_mode();
|
eth_duplex_t get_duplex_mode();
|
||||||
eth_speed_t get_link_speed();
|
eth_speed_t get_link_speed();
|
||||||
|
|||||||
@@ -928,11 +928,6 @@ void EthernetComponent::get_eth_mac_address_raw(uint8_t *mac) {
|
|||||||
ESPHL_ERROR_CHECK(err, "ETH_CMD_G_MAC error");
|
ESPHL_ERROR_CHECK(err, "ETH_CMD_G_MAC error");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EthernetComponent::get_eth_mac_address_pretty() {
|
|
||||||
char buf[MAC_ADDRESS_PRETTY_BUFFER_SIZE];
|
|
||||||
return std::string(this->get_eth_mac_address_pretty_into_buffer(buf));
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *EthernetComponent::get_eth_mac_address_pretty_into_buffer(
|
const char *EthernetComponent::get_eth_mac_address_pretty_into_buffer(
|
||||||
std::span<char, MAC_ADDRESS_PRETTY_BUFFER_SIZE> buf) {
|
std::span<char, MAC_ADDRESS_PRETTY_BUFFER_SIZE> buf) {
|
||||||
uint8_t mac[MAC_ADDRESS_SIZE];
|
uint8_t mac[MAC_ADDRESS_SIZE];
|
||||||
|
|||||||
@@ -249,11 +249,6 @@ void EthernetComponent::get_eth_mac_address_raw(uint8_t *mac) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EthernetComponent::get_eth_mac_address_pretty() {
|
|
||||||
char buf[MAC_ADDRESS_PRETTY_BUFFER_SIZE];
|
|
||||||
return std::string(this->get_eth_mac_address_pretty_into_buffer(buf));
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *EthernetComponent::get_eth_mac_address_pretty_into_buffer(
|
const char *EthernetComponent::get_eth_mac_address_pretty_into_buffer(
|
||||||
std::span<char, MAC_ADDRESS_PRETTY_BUFFER_SIZE> buf) {
|
std::span<char, MAC_ADDRESS_PRETTY_BUFFER_SIZE> buf) {
|
||||||
uint8_t mac[MAC_ADDRESS_SIZE];
|
uint8_t mac[MAC_ADDRESS_SIZE];
|
||||||
|
|||||||
Reference in New Issue
Block a user