define to use W5500 chip and mark SPI functions to be replaced as weak

This commit is contained in:
2020-11-07 21:14:04 +01:00
parent a33e0f8381
commit 0446055537
2 changed files with 10 additions and 6 deletions

View File

@ -80,7 +80,7 @@ void wizchip_cris_exit(void) {}
* null function is called. * null function is called.
*/ */
//void wizchip_cs_select(void) {}; //void wizchip_cs_select(void) {};
void wizchip_cs_select(void) {} __attribute__((weak)) void wizchip_cs_select(void) {}
/** /**
* @brief Default function to deselect chip. * @brief Default function to deselect chip.
@ -88,7 +88,7 @@ void wizchip_cs_select(void) {}
* null function is called. * null function is called.
*/ */
//void wizchip_cs_deselect(void) {}; //void wizchip_cs_deselect(void) {};
void wizchip_cs_deselect(void) {} __attribute__((weak)) void wizchip_cs_deselect(void) {}
/** /**
* @brief Default function to read in direct or indirect interface. * @brief Default function to read in direct or indirect interface.
@ -114,7 +114,7 @@ void wizchip_bus_writedata(uint32_t AddrSel, iodata_t wb) { *((volatile iodata
* null function is called. * null function is called.
*/ */
//uint8_t wizchip_spi_readbyte(void) {return 0;}; //uint8_t wizchip_spi_readbyte(void) {return 0;};
uint8_t wizchip_spi_readbyte(void) {return 0;} __attribute__((weak)) uint8_t wizchip_spi_readbyte(void) {return 0;}
/** /**
* @brief Default function to write in SPI interface. * @brief Default function to write in SPI interface.
@ -122,7 +122,7 @@ uint8_t wizchip_spi_readbyte(void) {return 0;}
* null function is called. * null function is called.
*/ */
//void wizchip_spi_writebyte(uint8_t wb) {}; //void wizchip_spi_writebyte(uint8_t wb) {};
void wizchip_spi_writebyte(uint8_t wb) {} __attribute__((weak)) void wizchip_spi_writebyte(uint8_t wb) {}
/** /**
* @brief Default function to burst read in SPI interface. * @brief Default function to burst read in SPI interface.
@ -130,7 +130,7 @@ void wizchip_spi_writebyte(uint8_t wb) {}
* null function is called. * null function is called.
*/ */
//void wizchip_spi_readburst(uint8_t* pBuf, uint16_t len) {}; //void wizchip_spi_readburst(uint8_t* pBuf, uint16_t len) {};
void wizchip_spi_readburst(uint8_t* pBuf, uint16_t len) {} __attribute__((weak)) void wizchip_spi_readburst(uint8_t* pBuf, uint16_t len) {}
/** /**
* @brief Default function to burst write in SPI interface. * @brief Default function to burst write in SPI interface.
@ -138,7 +138,7 @@ void wizchip_spi_readburst(uint8_t* pBuf, uint16_t len) {}
* null function is called. * null function is called.
*/ */
//void wizchip_spi_writeburst(uint8_t* pBuf, uint16_t len) {}; //void wizchip_spi_writeburst(uint8_t* pBuf, uint16_t len) {};
void wizchip_spi_writeburst(uint8_t* pBuf, uint16_t len) {} __attribute__((weak)) void wizchip_spi_writeburst(uint8_t* pBuf, uint16_t len) {}
/** /**
* @\ref _WIZCHIP instance * @\ref _WIZCHIP instance

View File

@ -71,6 +71,10 @@ extern "C" {
#define W5300 5300 #define W5300 5300
#define W5500 5500 #define W5500 5500
#define _WIZCHIP_ W5500
#ifndef _WIZCHIP_ #ifndef _WIZCHIP_
#define _WIZCHIP_ W5100S // W5100, W5100S, W5200, W5300, W5500 #define _WIZCHIP_ W5100S // W5100, W5100S, W5200, W5300, W5500
#endif #endif