From: Michel Pollet Date: Wed, 6 Jun 2012 10:52:47 +0000 (+0100) Subject: spi: Reset the SPI Interrupt Flag X-Git-Tag: v1.0~89 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=90da54280f2ff2d91f2e51f41a5e747c56db6f94;p=sx%2Fsimavr.git 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 --- 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; }