[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5289] Set link state to CRC_ERROR and check CS when
From: |
Allen Ibara |
Subject: |
[paparazzi-commits] [5289] Set link state to CRC_ERROR and check CS when in said state |
Date: |
Mon, 09 Aug 2010 23:09:51 +0000 |
Revision: 5289
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5289
Author: aibara
Date: 2010-08-09 23:09:51 +0000 (Mon, 09 Aug 2010)
Log Message:
-----------
Set link state to CRC_ERROR and check CS when in said state
Modified Paths:
--------------
paparazzi3/trunk/sw/airborne/lisa/arch/stm32/lisa_overo_link_crc_arch.h
Modified:
paparazzi3/trunk/sw/airborne/lisa/arch/stm32/lisa_overo_link_crc_arch.h
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/arch/stm32/lisa_overo_link_crc_arch.h
2010-08-09 22:48:09 UTC (rev 5288)
+++ paparazzi3/trunk/sw/airborne/lisa/arch/stm32/lisa_overo_link_crc_arch.h
2010-08-09 23:09:51 UTC (rev 5289)
@@ -16,18 +16,23 @@
LED_TOGGLE(OVERO_LINK_LED_OK); \
LED_OFF(OVERO_LINK_LED_KO); \
_data_received_handler(); \
+ overo_link_arch_prepare_next_transfert(0); \
+ overo_link.status = IDLE;
\
}
\
else { \
LED_OFF(OVERO_LINK_LED_OK); \
LED_ON(OVERO_LINK_LED_KO); \
_crc_failed_handler(); \
- /* wait until we're not selected */ \
- while (!GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_4)); \
- uint8_t foo __attribute__ ((unused)) = SPI_I2S_ReceiveData(SPI1); \
+ overo_link.status = CRC_ERROR; \
}
\
- overo_link_arch_prepare_next_transfert(0); \
- overo_link.status = IDLE;
\
} \
+ else if (overo_link.status == CRC_ERROR) { \
+ /* wait until we're not selected */ \
+ if (GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_4)) { \
+ uint8_t foo __attribute__ ((unused)) = SPI_I2S_ReceiveData(SPI1); \
+ overo_link.status = IDLE; \
+ } \
+ } \
}
#endif /* LISA_OVERO_LINK_ARCH_H */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5289] Set link state to CRC_ERROR and check CS when in said state,
Allen Ibara <=