diff options
author | Uros Majstorovic <majstor@majstor.org> | 2022-09-04 18:20:12 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2022-09-04 18:20:12 +0200 |
commit | 8f47a50abe4cbae953724ea4769fbd629ee9b801 (patch) | |
tree | 3e83ca8f444faad5c563b0a5716d88aff8ba3ff4 /fw/fe310 | |
parent | 5d88349c60459f44cb6614852abb00d0f58d6e8f (diff) |
moved critical functions to itim
Diffstat (limited to 'fw/fe310')
-rw-r--r-- | fw/fe310/eos/soc/spi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fw/fe310/eos/soc/spi.c b/fw/fe310/eos/soc/spi.c index 2c36109..b722c7e 100644 --- a/fw/fe310/eos/soc/spi.c +++ b/fw/fe310/eos/soc/spi.c @@ -117,6 +117,7 @@ void eos_spi_set_handler(unsigned char evt, eos_evt_handler_t handler) { if (evt && (evt <= EOS_SPI_MAX_EVT)) evt_handler[evt - 1] = handler; } +__attribute__ ((section (".itim"))) void _eos_spi_xchg_init(unsigned char *buffer, uint16_t len, uint8_t flags) { spi_state_flags &= 0xF0; spi_state_flags |= (SPI_FLAG_XCHG | flags); @@ -149,6 +150,7 @@ void eos_spi_xchg(unsigned char *buffer, uint16_t len, uint8_t flags) { SPI1_REG(SPI_REG_IE) = SPI_IP_TXWM; } +__attribute__ ((section (".itim"))) void eos_spi_handle_xchg(void) { int i; uint16_t sz_chunk = MIN(spi_state_len - spi_state_idx_tx, SPI_SIZE_CHUNK); @@ -180,6 +182,7 @@ void eos_spi_handle_xchg(void) { } } +__attribute__ ((section (".itim"))) void eos_spi_cs_set(void) { /* cs low */ if (SPI1_REG(SPI_REG_CSMODE) == SPI_CSMODE_OFF) { @@ -189,6 +192,7 @@ void eos_spi_cs_set(void) { } } +__attribute__ ((section (".itim"))) void eos_spi_cs_clear(void) { /* cs high */ if (SPI1_REG(SPI_REG_CSMODE) == SPI_CSMODE_OFF) { |