diff options
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; } |