drivers/wiznet5k: Get low-level W5500 driver working.

This patch implements the basic SPI read/write functions for the W5500
chip.  It also allows _WIZCHIP_ to be configured externally to select the
specific Wiznet chip.
crypto-aes
Damien George 5 years ago
parent 73e387cff6
commit c0ea91bc89
  1. 10
      drivers/wiznet5k/ethernet/w5500/w5500.c
  2. 1
      drivers/wiznet5k/ethernet/w5500/w5500.h
  3. 2
      drivers/wiznet5k/ethernet/wizchip_conf.h

@ -57,6 +57,16 @@
////////////////////////////////////////////////////
#define LPC_SSP0 (0)
static void Chip_SSP_ReadFrames_Blocking(int dummy, uint8_t *buf, uint32_t len) {
WIZCHIP.IF.SPI._read_bytes(buf, len);
}
static void Chip_SSP_WriteFrames_Blocking(int dummy, const uint8_t *buf, uint32_t len) {
WIZCHIP.IF.SPI._write_bytes(buf, len);
}
uint8_t WIZCHIP_READ(uint32_t AddrSel)
{
uint8_t ret;

@ -44,7 +44,6 @@
#include <stdint.h>
#include "../wizchip_conf.h"
#include "board.h"
#define _W5500_IO_BASE_ 0x00000000

@ -56,7 +56,9 @@
* @todo You should select one, \b 5100, \b 5200 ,\b 5500 or etc. \n\n
* ex> <code> #define \_WIZCHIP_ 5500 </code>
*/
#ifndef _WIZCHIP_
#define _WIZCHIP_ 5200 // 5100, 5200, 5500
#endif
#define _WIZCHIP_IO_MODE_NONE_ 0x0000
#define _WIZCHIP_IO_MODE_BUS_ 0x0100 /**< Bus interface mode */

Loading…
Cancel
Save