Split w6300 headers into public w6300.h and w6300_internal.h, rename pio files
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
#include <cstring>
|
||||
#include "pico/stdlib.h"
|
||||
#include "pico/critical_section.h"
|
||||
#include "socket.h"
|
||||
#include "wizchip_spi.h"
|
||||
#include "wizchip_qspi_pio.h"
|
||||
#include "w6300_internal.h"
|
||||
#include "pio.h"
|
||||
|
||||
static critical_section_t g_cris_sec;
|
||||
|
||||
@@ -39,11 +38,8 @@ void wizchip_initialize() {
|
||||
ctlwizchip(CW_INIT_WIZCHIP, (void *)memsize);
|
||||
}
|
||||
|
||||
void wizchip_check() {
|
||||
if (getCIDR() != 0x6300) {
|
||||
printf("W6300 ACCESS ERR: CIDR = 0x%04x\n", getCIDR());
|
||||
while (1);
|
||||
}
|
||||
bool wizchip_check() {
|
||||
return getCIDR() == 0x6300;
|
||||
}
|
||||
|
||||
void network_initialize(wiz_NetInfo net_info) {
|
||||
@@ -611,7 +607,7 @@ int8_t listen(uint8_t sn) {
|
||||
return SOCK_OK;
|
||||
}
|
||||
|
||||
int8_t connect_W6x00(uint8_t sn, uint8_t * addr, uint16_t port, uint8_t addrlen) {
|
||||
int8_t connect(uint8_t sn, uint8_t * addr, uint16_t port, uint8_t addrlen) {
|
||||
CHECK_SOCKNUM();
|
||||
CHECK_TCPMODE();
|
||||
CHECK_SOCKINIT();
|
||||
@@ -732,7 +728,7 @@ int32_t recv(uint8_t sn, uint8_t * buf, uint16_t len) {
|
||||
return (int32_t)len;
|
||||
}
|
||||
|
||||
int32_t sendto_W6x00(uint8_t sn, uint8_t * buf, uint16_t len, uint8_t * addr, uint16_t port, uint8_t addrlen) {
|
||||
int32_t sendto(uint8_t sn, uint8_t * buf, uint16_t len, uint8_t * addr, uint16_t port, uint8_t addrlen) {
|
||||
uint8_t tmp = 0;
|
||||
uint8_t tcmd = Sn_CR_SEND;
|
||||
uint16_t freesize = 0;
|
||||
@@ -796,7 +792,7 @@ int32_t sendto_W6x00(uint8_t sn, uint8_t * buf, uint16_t len, uint8_t * addr, ui
|
||||
return (int32_t)len;
|
||||
}
|
||||
|
||||
int32_t recvfrom_W6x00(uint8_t sn, uint8_t * buf, uint16_t len, uint8_t * addr, uint16_t *port, uint8_t *addrlen) {
|
||||
int32_t recvfrom(uint8_t sn, uint8_t * buf, uint16_t len, uint8_t * addr, uint16_t *port, uint8_t *addrlen) {
|
||||
uint8_t mr;
|
||||
uint8_t head[8];
|
||||
uint16_t pack_len = 0;
|
||||
|
||||
Reference in New Issue
Block a user