diff options
author | Uros Majstorovic <majstor@majstor.org> | 2018-07-29 10:03:46 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2018-07-29 10:03:46 +0200 |
commit | a67f35abdb7ef55c062c26251b7354d9968d385b (patch) | |
tree | 35e82eeef30de66c2a87be6a138a19ec43c31e1a /code/fe310/eos/net.c | |
parent | 031e99994f495d584e3579cb3920dcc821d28ef1 (diff) |
pin numbers fixed
Diffstat (limited to 'code/fe310/eos/net.c')
-rw-r--r-- | code/fe310/eos/net.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/code/fe310/eos/net.c b/code/fe310/eos/net.c index e024896..bcfa1f2 100644 --- a/code/fe310/eos/net.c +++ b/code/fe310/eos/net.c @@ -189,7 +189,7 @@ static void spi_handler_cts(void) { if (_eos_spi_state_flags & SPI_FLAG_RDY) { spi_xchg_next(NULL); } else { - uint32_t iof_mask = ((uint32_t)1 << IOF_SPI1_SS2); + uint32_t iof_mask = ((uint32_t)1 << SPI_PIN_CS); GPIO_REG(GPIO_IOF_EN) &= ~iof_mask; } } @@ -260,7 +260,7 @@ void eos_net_init(void) { } void eos_net_start(uint32_t sckdiv) { - uint32_t iof_mask = ((uint32_t)1 << IOF_SPI1_SS2); + uint32_t iof_mask = ((uint32_t)1 << SPI_PIN_CS); GPIO_REG(GPIO_IOF_SEL) &= ~iof_mask; GPIO_REG(GPIO_IOF_EN) |= iof_mask; @@ -290,7 +290,7 @@ void eos_net_stop(void) { clear_csr(mstatus, MSTATUS_MIE); _eos_spi_state_flags &= ~SPI_FLAG_RDY; if (_eos_spi_state_flags & SPI_FLAG_CTS) { - uint32_t iof_mask = ((uint32_t)1 << IOF_SPI1_SS2); + uint32_t iof_mask = ((uint32_t)1 << SPI_PIN_CS); GPIO_REG(GPIO_IOF_EN) &= ~iof_mask; done = 1; } |