From 90da54280f2ff2d91f2e51f41a5e747c56db6f94 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Wed, 6 Jun 2012 11:52:47 +0100 Subject: [PATCH] spi: Reset the SPI Interrupt Flag Reset the SPI Interrupt Flag in SPSR uppon read of a SPI byte. via sebastien.besombes@gmail.com Signed-off-by: Michel Pollet --- simavr/sim/avr_spi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/simavr/sim/avr_spi.c b/simavr/sim/avr_spi.c index 05810bf..7a491b4 100644 --- a/simavr/sim/avr_spi.c +++ b/simavr/sim/avr_spi.c @@ -41,6 +41,7 @@ static uint8_t avr_spi_read(struct avr_t * avr, avr_io_addr_t addr, void * param avr_spi_t * p = (avr_spi_t *)param; uint8_t v = p->input_data_register; p->input_data_register = 0; + avr_regbit_clear(avr, p->spi.raised); // printf("avr_spi_read = %02x\n", v); return v; } -- 2.39.5