C++-ize W6300 driver: remove vtable indirection, constexpr pins, pragma once
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
#ifndef _WIZCHIP_SPI_H_
|
||||
#define _WIZCHIP_SPI_H_
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include "wizchip_conf.h"
|
||||
|
||||
#define USE_PIO
|
||||
#define WIZNET_SPI_CLKDIV_MAJOR_DEFAULT 2
|
||||
#define WIZNET_SPI_CLKDIV_MINOR_DEFAULT 0
|
||||
constexpr uint8_t PIN_INT = 15;
|
||||
constexpr uint8_t PIN_CS = 16;
|
||||
constexpr uint8_t PIO_SPI_SCK_PIN = 17;
|
||||
constexpr uint8_t PIO_SPI_DATA_IO0_PIN = 18;
|
||||
constexpr uint8_t PIO_SPI_DATA_IO1_PIN = 19;
|
||||
constexpr uint8_t PIO_SPI_DATA_IO2_PIN = 20;
|
||||
constexpr uint8_t PIO_SPI_DATA_IO3_PIN = 21;
|
||||
constexpr uint8_t PIN_RST = 22;
|
||||
|
||||
#define PIN_INT 15
|
||||
#define PIN_CS 16
|
||||
#define PIO_SPI_SCK_PIN 17
|
||||
#define PIO_SPI_DATA_IO0_PIN 18
|
||||
#define PIO_SPI_DATA_IO1_PIN 19
|
||||
#define PIO_SPI_DATA_IO2_PIN 20
|
||||
#define PIO_SPI_DATA_IO3_PIN 21
|
||||
#define PIN_RST 22
|
||||
constexpr uint16_t WIZNET_SPI_CLKDIV_MAJOR_DEFAULT = 2;
|
||||
constexpr uint8_t WIZNET_SPI_CLKDIV_MINOR_DEFAULT = 0;
|
||||
|
||||
void wizchip_spi_initialize(void);
|
||||
void wizchip_cris_initialize(void);
|
||||
void wizchip_reset(void);
|
||||
void wizchip_initialize(void);
|
||||
void wizchip_check(void);
|
||||
void wizchip_spi_initialize();
|
||||
void wizchip_cris_initialize();
|
||||
void wizchip_reset();
|
||||
void wizchip_initialize();
|
||||
void wizchip_check();
|
||||
void network_initialize(wiz_NetInfo net_info);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user