diff options
author | Uros Majstorovic <majstor@majstor.org> | 2018-01-17 07:45:32 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2018-01-17 07:45:32 +0100 |
commit | 97a7e6617f8ad06b7bff495603200b853766ecc8 (patch) | |
tree | 9e8a4aaa5b3ef366c595595871db43eae2facdc2 /code/fe310 | |
parent | 01c3e3af2394f863323b846fa304ff7e0a30e9df (diff) |
basic test for eos & fe310 passed
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 { |