Convert W6300 #defines to constexpr/inline across all headers

This commit is contained in:
Ian Gulliver
2026-04-04 17:21:57 +09:00
parent 92e00476da
commit 224fe4f7eb
5 changed files with 590 additions and 936 deletions

View File

@@ -1,14 +1,13 @@
#pragma once
#include <cstdint>
#define W6300 6300
#define _WIZCHIP_ W6300
constexpr int _WIZCHIP_ = 6300;
#define _PHY_IO_MODE_PHYCR_ 0x0000
#define _PHY_IO_MODE_MII_ 0x0010
#define _PHY_IO_MODE_ _PHY_IO_MODE_MII_
constexpr uint16_t _PHY_IO_MODE_PHYCR_ = 0x0000;
constexpr uint16_t _PHY_IO_MODE_MII_ = 0x0010;
constexpr uint16_t _PHY_IO_MODE_ = _PHY_IO_MODE_MII_;
#define _WIZCHIP_QSPI_MODE_ (0x02 << 6)
constexpr uint8_t _WIZCHIP_QSPI_MODE_ = 0x02 << 6;
using iodata_t = uint8_t;
using datasize_t = int16_t;
@@ -16,7 +15,7 @@ using datasize_t = int16_t;
#include "w6300.h"
constexpr int WIZCHIP_SOCK_NUM = 8;
#define _WIZCHIP_SOCK_NUM_ WIZCHIP_SOCK_NUM
constexpr int _WIZCHIP_SOCK_NUM_ = WIZCHIP_SOCK_NUM;
enum ctlwizchip_type {
CW_SYS_LOCK, CW_SYS_UNLOCK, CW_GET_SYSLOCK,