From a67f35abdb7ef55c062c26251b7354d9968d385b Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 29 Jul 2018 10:03:46 +0200 Subject: pin numbers fixed --- code/fe310/eos/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'code/fe310/eos/net.c') 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; } -- cgit v1.2.3