diff options
Diffstat (limited to 'code/fe310')
-rw-r--r-- | code/fe310/eos/ecp.c | 4 | ||||
-rw-r--r-- | code/fe310/eos/ecp.h | 3 | ||||
-rw-r--r-- | code/fe310/eos/eos.c | 2 | ||||
-rw-r--r-- | code/fe310/eos/spi.h | 4 |
4 files changed, 9 insertions, 4 deletions
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 <ecp/core.h> -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 { |