Remove unused iodata_t, PIO_OFFSET_WRITE_BITS, trim intr_kind, move sock_count to cpp
This commit is contained in:
@@ -8,12 +8,14 @@
|
|||||||
#include "qspi.pio.h"
|
#include "qspi.pio.h"
|
||||||
|
|
||||||
namespace w6300 {
|
namespace w6300 {
|
||||||
|
|
||||||
|
constexpr int sock_count = 8;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
#define PIO_PROGRAM_NAME qspi
|
#define PIO_PROGRAM_NAME qspi
|
||||||
#define PIO_PROGRAM_FUNC __CONCAT(PIO_PROGRAM_NAME, _program)
|
#define PIO_PROGRAM_FUNC __CONCAT(PIO_PROGRAM_NAME, _program)
|
||||||
#define PIO_PROGRAM_GET_DEFAULT_CONFIG_FUNC __CONCAT(PIO_PROGRAM_NAME, _program_get_default_config)
|
#define PIO_PROGRAM_GET_DEFAULT_CONFIG_FUNC __CONCAT(PIO_PROGRAM_NAME, _program_get_default_config)
|
||||||
#define PIO_OFFSET_WRITE_BITS __CONCAT(PIO_PROGRAM_NAME, _offset_write_bits)
|
|
||||||
#define PIO_OFFSET_WRITE_BITS_END __CONCAT(PIO_PROGRAM_NAME, _offset_write_bits_end)
|
#define PIO_OFFSET_WRITE_BITS_END __CONCAT(PIO_PROGRAM_NAME, _offset_write_bits_end)
|
||||||
#define PIO_OFFSET_READ_BITS_END __CONCAT(PIO_PROGRAM_NAME, _offset_read_bits_end)
|
#define PIO_OFFSET_READ_BITS_END __CONCAT(PIO_PROGRAM_NAME, _offset_read_bits_end)
|
||||||
|
|
||||||
@@ -225,7 +227,6 @@ void pio_write(uint8_t opcode, uint16_t addr, uint8_t* buf, uint16_t len) {
|
|||||||
pio_sm_set_enabled(state.pio, state.pio_sm, false);
|
pio_sm_set_enabled(state.pio, state.pio_sm, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
using iodata_t = uint8_t;
|
|
||||||
using datasize_t = int16_t;
|
using datasize_t = int16_t;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
namespace w6300 {
|
namespace w6300 {
|
||||||
|
|
||||||
constexpr int sock_count = 8;
|
|
||||||
|
|
||||||
enum class socket_id : uint8_t {};
|
enum class socket_id : uint8_t {};
|
||||||
|
|
||||||
enum class sock_error : int16_t {
|
enum class sock_error : int16_t {
|
||||||
@@ -30,14 +28,7 @@ enum class sock_flag : uint8_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum intr_kind : uint32_t {
|
enum intr_kind : uint32_t {
|
||||||
ik_pppoe_terminated = (1 << 0), ik_dest_unreach = (1 << 1), ik_ip_conflict = (1 << 2),
|
ik_sock_0 = (1 << 8),
|
||||||
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_int_all = 0x00FFFF97
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user