Use machine structure

This commit is contained in:
logicog
2025-12-12 09:06:52 +01:00
parent 06fbf85bce
commit d75ad636f9
9 changed files with 109 additions and 194 deletions
+2 -8
View File
@@ -4,13 +4,13 @@
#include "uip/uip-conf.h"
#include <stdint.h>
// This has to be set to the number of SFP+ ports, i.e. 1 or 2
#define NSFP 2
// SCL and SDA pin numbers for SFP cage 0 and SFP cage 1
#define SCL_PIN 3
#define SDA_PIN_0 4
#define SDA_PIN_1 3
#define CPU_PORT 9
// Define Port-masks for 9-port devices and 6-port devices
#define PMASK_9 0x1ff
#define PMASK_6 0x1f8
@@ -41,12 +41,6 @@
// This is the standard size of an Ethernet frame header
#define ETHER_HEADER_SIZE 14
#if NSFP == 1
#define IS_SFP(port) (i == maxPort)
#else
#define IS_SFP(port) (i == maxPort || i == 3)
#endif
#define CONFIG_START 0x70000
#define CONFIG_LEN 0x1000
#define CODE0_SIZE 0x4000