From a8ab755f318d949b9a878802ec392dcc74168310 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Mon, 13 Jul 2015 13:53:35 +0200 Subject: [PATCH] simulator.h: provide a minimalistic SPI fake. This mostly means: there is no SPI simulator, so don't build support for it. This was found by running the new regression tests. --- simulator.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/simulator.h b/simulator.h index 7cd03fb..fbb446c 100644 --- a/simulator.h +++ b/simulator.h @@ -177,6 +177,16 @@ uint16_t sim_tick_counter(void); uint64_t sim_runtime_ns(void); ///< Simulated run-time in nanoseconds void sim_time_warp(void); ///< skip ahead to next timer interrupt, when time_scale==0 +/** SPI subsystem. + + So far there isn't really one. Disable SD and fake the remaining + neccessary bits. +*/ +#undef SD_CARD_SELECT_PIN +#undef SD +#define loop_until_bit_is_set(SPSR, SPIF) +uint8_t SPCR, SPDR, SPSR; + #define DIO0_PIN "proof of life" #endif /* _SIMULATOR_H */