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.
pull/3377/head
Damien George 2017-10-16 15:34:08 +11:00
rodzic 73e387cff6
commit c0ea91bc89
3 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

@ -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;

Wyświetl plik

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

Wyświetl plik

@ -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 */