mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Move definition of NSFP to header file
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
#include "uip/uip-conf.h"
|
#include "uip/uip-conf.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
// This has to be set to the number of SFP+ ports, i.e. 1 or 2
|
||||||
|
#define NSFP 2
|
||||||
|
|
||||||
// The serial buffer. Defines the command line size
|
// The serial buffer. Defines the command line size
|
||||||
// Must be 2^x and <= 128
|
// Must be 2^x and <= 128
|
||||||
#define SBUF_SIZE 128
|
#define SBUF_SIZE 128
|
||||||
@@ -23,6 +26,11 @@
|
|||||||
// This is the standard size of an Ethernet frame header
|
// This is the standard size of an Ethernet frame header
|
||||||
#define ETHER_HEADER_SIZE 14
|
#define ETHER_HEADER_SIZE 14
|
||||||
|
|
||||||
|
#if NSFP == 1
|
||||||
|
#define IS_SFP(port) (i == maxPort)
|
||||||
|
#else
|
||||||
|
#define IS_SFP(port) (i == maxPort || i == 3)
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Representation of a 48-bit Ethernet address.
|
* Representation of a 48-bit Ethernet address.
|
||||||
@@ -64,4 +72,5 @@ uint16_t strtox(register __xdata uint8_t *dst, register __code const char *s);
|
|||||||
void tcpip_output(void);
|
void tcpip_output(void);
|
||||||
void print_string_x(__xdata char *p);
|
void print_string_x(__xdata char *p);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user