summaryrefslogtreecommitdiff
path: root/fw/fe310
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310')
-rw-r--r--fw/fe310/eos/soc/spi.c4
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) {