Rename screaming case symbols to snake_case in w6300 public API

This commit is contained in:
Ian Gulliver
2026-04-07 07:09:11 +09:00
parent 843a286631
commit 3c320cf466
2 changed files with 37 additions and 37 deletions

View File

@@ -7,7 +7,7 @@
namespace w6300 {
constexpr int SOCK_COUNT = 8;
constexpr int sock_count = 8;
enum class socket_id : uint8_t {};
enum class port_num : uint16_t {};
@@ -100,15 +100,15 @@ enum class sock_io_mode : uint8_t {
};
enum intr_kind : uint32_t {
IK_PPPOE_TERMINATED = (1 << 0), IK_DEST_UNREACH = (1 << 1), IK_IP_CONFLICT = (1 << 2),
IK_DEST_UNREACH6 = (1 << 4), IK_WOL = (1 << 7), IK_NET_ALL = 0x97,
IK_SOCK_0 = (1 << 8), IK_SOCK_1 = (1 << 9), IK_SOCK_2 = (1 << 10), IK_SOCK_3 = (1 << 11),
IK_SOCK_4 = (1 << 12), IK_SOCK_5 = (1 << 13), IK_SOCK_6 = (1 << 14), IK_SOCK_7 = (1 << 15),
IK_SOCK_ALL = (0xFF << 8),
IK_SOCKL_TOUT = (1 << 16), IK_SOCKL_ARP4 = (1 << 17), IK_SOCKL_PING4 = (1 << 18),
IK_SOCKL_ARP6 = (1 << 19), IK_SOCKL_PING6 = (1 << 20), IK_SOCKL_NS = (1 << 21),
IK_SOCKL_RS = (1 << 22), IK_SOCKL_RA = (1 << 23), IK_SOCKL_ALL = (0xFF << 16),
IK_INT_ALL = 0x00FFFF97
ik_pppoe_terminated = (1 << 0), ik_dest_unreach = (1 << 1), ik_ip_conflict = (1 << 2),
ik_dest_unreach6 = (1 << 4), ik_wol = (1 << 7), ik_net_all = 0x97,
ik_sock_0 = (1 << 8), ik_sock_1 = (1 << 9), ik_sock_2 = (1 << 10), ik_sock_3 = (1 << 11),
ik_sock_4 = (1 << 12), ik_sock_5 = (1 << 13), ik_sock_6 = (1 << 14), ik_sock_7 = (1 << 15),
ik_sock_all = (0xFF << 8),
ik_sockl_tout = (1 << 16), ik_sockl_arp4 = (1 << 17), ik_sockl_ping4 = (1 << 18),
ik_sockl_arp6 = (1 << 19), ik_sockl_ping6 = (1 << 20), ik_sockl_ns = (1 << 21),
ik_sockl_rs = (1 << 22), ik_sockl_ra = (1 << 23), ik_sockl_all = (0xFF << 16),
ik_int_all = 0x00FFFF97
};
struct phy_conf {
@@ -119,12 +119,12 @@ struct phy_conf {
};
enum ipconf_mode : uint8_t {
NETINFO_NONE = 0x00, NETINFO_STATIC_V4 = 0x01, NETINFO_STATIC_V6 = 0x02,
NETINFO_STATIC_ALL = 0x03, NETINFO_SLAAC_V6 = 0x04,
NETINFO_DHCP_V4 = 0x10, NETINFO_DHCP_V6 = 0x20, NETINFO_DHCP_ALL = 0x30
ipconf_none = 0x00, ipconf_static_v4 = 0x01, ipconf_static_v6 = 0x02,
ipconf_static_all = 0x03, ipconf_slaac_v6 = 0x04,
ipconf_dhcp_v4 = 0x10, ipconf_dhcp_v6 = 0x20, ipconf_dhcp_all = 0x30
};
enum dhcp_mode : uint8_t { NETINFO_STATIC = 1, NETINFO_DHCP };
enum dhcp_mode : uint8_t { dhcp_static = 1, dhcp_dynamic };
struct net_info {
std::array<uint8_t, 6> mac;
@@ -142,14 +142,14 @@ struct net_info {
};
enum netmode_type : uint32_t {
NM_IPB_V4 = (1 << 0), NM_IPB_V6 = (1 << 1), NM_WOL = (1 << 2),
NM_PB6_MULTI = (1 << 4), NM_PB6_ALLNODE = (1 << 5), NM_MR_MASK = 0x37,
NM_PPPoE = (1 << 8), NM_DHA_SELECT = (1 << 15), NM_MR2_MASK = (0x09 << 8),
NM_PB4_ALL = (1 << 16), NM_TRSTB_V4 = (1 << 17), NM_PARP_V4 = (1 << 18),
NM_UNRB_V4 = (1 << 19), NM_NET4_MASK = (0x0F << 16),
NM_PB6_ALL = (1 << 24), NM_TRSTB_V6 = (1 << 25), NM_PARP_V6 = (1 << 26),
NM_UNRB_V6 = (1 << 27), NM_NET6_MASK = (0x0F << 24),
NM_MASK_ALL = 0x0F0F0937
nm_ipb_v4 = (1 << 0), nm_ipb_v6 = (1 << 1), nm_wol = (1 << 2),
nm_pb6_multi = (1 << 4), nm_pb6_allnode = (1 << 5), nm_mr_mask = 0x37,
nm_pppoe = (1 << 8), nm_dha_select = (1 << 15), nm_mr2_mask = (0x09 << 8),
nm_pb4_all = (1 << 16), nm_trstb_v4 = (1 << 17), nm_parp_v4 = (1 << 18),
nm_unrb_v4 = (1 << 19), nm_net4_mask = (0x0F << 16),
nm_pb6_all = (1 << 24), nm_trstb_v6 = (1 << 25), nm_parp_v6 = (1 << 26),
nm_unrb_v6 = (1 << 27), nm_net6_mask = (0x0F << 24),
nm_mask_all = 0x0F0F0937
};
struct net_timeout {