From 97a7e6617f8ad06b7bff495603200b853766ecc8 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 17 Jan 2018 07:45:32 +0100 Subject: basic test for eos & fe310 passed --- code/fe310/eos/ecp.c | 4 ++++ code/fe310/eos/ecp.h | 3 ++- code/fe310/eos/eos.c | 2 +- code/fe310/eos/spi.h | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) (limited to 'code/fe310') diff --git a/code/fe310/eos/ecp.c b/code/fe310/eos/ecp.c index 433e693..190d1f0 100644 --- a/code/fe310/eos/ecp.c +++ b/code/fe310/eos/ecp.c @@ -63,4 +63,8 @@ int ecp_init(ECPContext *ctx) { eos_evtq_set_handler(EOS_EVT_MASK_NET | EOS_NET_CMD_PKT, packet_handler); return ECP_OK; +} + +void ecp_sock_set(ECPSocket *s) { + _sock = s; } \ No newline at end of file diff --git a/code/fe310/eos/ecp.h b/code/fe310/eos/ecp.h index 95aed31..9cc84db 100644 --- a/code/fe310/eos/ecp.h +++ b/code/fe310/eos/ecp.h @@ -1,3 +1,4 @@ #include -int ecp_init(ECPContext *ctx); \ No newline at end of file +int ecp_init(ECPContext *ctx); +void ecp_sock_set(ECPSocket *s); \ No newline at end of file diff --git a/code/fe310/eos/eos.c b/code/fe310/eos/eos.c index 3ad3b68..8dbfdac 100644 --- a/code/fe310/eos/eos.c +++ b/code/fe310/eos/eos.c @@ -13,5 +13,5 @@ void eos_init(void) { } void eos_start(void) { - eos_net_start(15); + eos_net_start(255); } \ No newline at end of file diff --git a/code/fe310/eos/spi.h b/code/fe310/eos/spi.h index 88e54bb..7e281b8 100644 --- a/code/fe310/eos/spi.h +++ b/code/fe310/eos/spi.h @@ -11,8 +11,8 @@ #define SPI_SIZE_BUF 1500 #define SPI_SIZE_CHUNK 4 #define SPI_SIZE_BUFQ 4 -#define SPI_GPIO_CTS_OFFSET PIN_2_OFFSET -#define SPI_GPIO_RTS_OFFSET PIN_3_OFFSET +#define SPI_GPIO_RTS_OFFSET PIN_8_OFFSET +#define SPI_GPIO_CTS_OFFSET PIN_7_OFFSET #define SPI_IOF_MASK (((uint32_t)1 << IOF_SPI1_SCK) | ((uint32_t)1 << IOF_SPI1_MOSI) | ((uint32_t)1 << IOF_SPI1_MISO)) typedef struct SPIBuffer { -- cgit v1.2.3