Any interrupts do very bad things to our SPI reliability. Block
interrupts for the whole of the SPI slave ISR.
Signed-off-by: Keith Packard <keithp@keithp.com>
static uint8_t ao_spi_slave_running;
static uint8_t ao_spi_slave_running;
+ISR(PCINT0_vect, ISR_BLOCK)
{
if ((PINB & (1 << PINB0)) == 0) {
if (!ao_spi_slave_running) {
uint8_t changed;
ao_spi_slave_running = 1;
{
if ((PINB & (1 << PINB0)) == 0) {
if (!ao_spi_slave_running) {
uint8_t changed;
ao_spi_slave_running = 1;
changed = ao_spi_slave_recv();
changed = ao_spi_slave_recv();
if (changed && ao_flight_boost <= ao_log_store.tm_state) {
if (ao_log_store.tm_state < ao_flight_landed)
ao_log_start();
if (changed && ao_flight_boost <= ao_log_store.tm_state) {
if (ao_log_store.tm_state < ao_flight_landed)
ao_log_start();