29 #include "fnet_config.h" 32 #include "mcf/fnet_mcf.h" 36 #include "mk/fnet_mk.h" 40 #include "mpc/fnet_mpc.h" 44 #include "lpc/fnet_lpc.h" 48 #include "mimxrt/fnet_mimxrt.h" 51 #include "stack/fnet_stdlib.h" 56 #if FNET_CFG_CPU_CACHE 58 #define FNET_AT_NONCACHEABLE_SECTION(var) var @FNET_CFG_CPU_NONCACHEABLE_SECTION 59 #elif FNET_CFG_COMP_UV || FNET_CFG_COMP_GNUC || FNET_CFG_COMP_GHS 60 #define FNET_AT_NONCACHEABLE_SECTION(var) __attribute__((section(FNET_CFG_CPU_NONCACHEABLE_SECTION))) var 62 #error Compiler is not supported 63 #define FNET_AT_NONCACHEABLE_SECTION(var) var 66 #define FNET_AT_NONCACHEABLE_SECTION(var) var 73 #if defined(__cplusplus) 83 #if FNET_CFG_CPU_LITTLE_ENDIAN || defined(__DOXYGEN__) 93 #define FNET_HTONS(short_var) (((((fnet_uint16_t)(short_var)) & 0x00FFU) << 8U) | (((fnet_uint16_t)(short_var) & 0xFF00U) >> 8U)) 102 #define FNET_NTOHS(short_var) FNET_HTONS(short_var) 111 #define FNET_HTONL(long_var) ((((long_var) & 0x000000FFU) << 24U) | (((long_var) & 0x0000FF00U) << 8U) | (((long_var) & 0x00FF0000U) >> 8U) | (((long_var) & 0xFF000000U) >> 24U)) 120 #define FNET_NTOHL(long_var) FNET_HTONL(long_var) 140 fnet_uint16_t
fnet_htons(fnet_uint16_t short_var);
142 #define fnet_ntohs fnet_htons 161 fnet_uint16_t
fnet_ntohs(fnet_uint16_t short_var);
181 fnet_uint32_t
fnet_htonl(fnet_uint32_t long_var);
183 #define fnet_ntohl fnet_htonl 202 fnet_uint32_t
fnet_ntohl(fnet_uint32_t long_var);
206 #define FNET_HTONS(short_var) (short_var) 207 #define FNET_NTOHS(short_var) (short_var) 208 #define FNET_HTONL(long_var) (long_var) 209 #define FNET_NTOHL(long_var) (long_var) 211 #define fnet_htons(short_var) (short_var) 212 #define fnet_ntohs(short_var) (short_var) 213 #define fnet_htonl(long_var) (long_var) 214 #define fnet_ntohl(long_var) (long_var) 422 #ifndef FNET_CPU_ADDR_TO_INSTRUCTION 423 #define FNET_CPU_ADDR_TO_INSTRUCTION(addr) (addr) 442 #ifndef FNET_CPU_INSTRUCTION_TO_ADDR 443 #define FNET_CPU_INSTRUCTION_TO_ADDR(addr) (addr) 457 #ifndef FNET_CPU_DATA_MEMORY_BARRIER 458 #define FNET_CPU_DATA_MEMORY_BARRIER do{}while(0) 463 #if FNET_CFG_CPU_ETH0 464 extern struct fnet_netif fnet_cpu_eth0_if;
465 #define FNET_CPU_ETH0_IF ((fnet_netif_desc_t)(&fnet_cpu_eth0_if)) 467 #if FNET_CFG_CPU_ETH1 468 extern struct fnet_netif fnet_cpu_eth1_if;
469 #define FNET_CPU_ETH1_IF ((fnet_netif_desc_t)(&fnet_cpu_eth1_if)) 471 #if FNET_CFG_CPU_WIFI 472 extern struct fnet_netif fnet_cpu_wifi_if;
473 #define FNET_CPU_WIFI_IF ((fnet_netif_desc_t)(&fnet_cpu_wifi_if)) 480 #define FNET_CPU_NETIF_NUMBER (FNET_CFG_CPU_ETH0+FNET_CFG_CPU_ETH1+FNET_CFG_CPU_WIFI) 482 #if defined(__cplusplus) fnet_uint16_t fnet_ntohs(fnet_uint16_t short_var)
Converts 16-bit value from network to host byte order.
void fnet_cpu_irq_enable(fnet_cpu_irq_desc_t irq_desc)
Enables interrupts.
fnet_int32_t fnet_cpu_serial_getchar(fnet_index_t port_number)
Reads character from the serial port.
void fnet_cpu_serial_putchar(fnet_index_t port_number, fnet_char_t character)
Writes character to the serial port.
fnet_return_t
General return codes, used by most of API functions.
unsigned long fnet_size_t
Unsigned integer type representing the size in bytes.
fnet_uint16_t fnet_htons(fnet_uint16_t short_var)
Converts 16-bit value from host to network byte order.
fnet_uint32_t fnet_htonl(fnet_uint32_t long_var)
Converts 32-bit value from host to network byte order.
fnet_return_t fnet_cpu_flash_write(fnet_uint8_t *dest, const fnet_uint8_t *data)
Writes the specified data to the Flash memory.
fnet_size_t bytes
Number of received bytes, in addition to megabytes, during the benchmark session. ...
fnet_return_t fnet_cpu_serial_init(fnet_index_t port_number, fnet_uint32_t baud_rate)
Initializes the serial port.
fnet_uint32_t fnet_cpu_irq_desc_t
IRQ status descriptor returned by the fnet_cpu_irq_disable() function. Actually it corresponds to the...
fnet_return_t fnet_cpu_flash_erase(void *flash_addr, fnet_size_t bytes)
Erases the specified range of the Flash memory.
void fnet_cpu_isr(void)
CPU-specific FNET interrupt service routine.
fnet_cpu_irq_desc_t fnet_cpu_irq_disable(void)
Disables all interrupts.
void fnet_cpu_reset(void)
Initiates software reset.
unsigned int fnet_index_t
Unsigned integer type representing the index.
char fnet_char_t
Type representing the charecter.
fnet_uint32_t fnet_ntohl(fnet_uint32_t long_var)
Converts 32-bit value from network to host byte order.