[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5288] still fighting with resync
From: |
antoine drouin |
Subject: |
[paparazzi-commits] [5288] still fighting with resync |
Date: |
Mon, 09 Aug 2010 22:48:09 +0000 |
Revision: 5288
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5288
Author: poine
Date: 2010-08-09 22:48:09 +0000 (Mon, 09 Aug 2010)
Log Message:
-----------
still fighting with resync
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:30:18 UTC (rev 5287)
+++ paparazzi3/trunk/sw/airborne/lisa/arch/stm32/lisa_overo_link_crc_arch.h
2010-08-09 22:48:09 UTC (rev 5288)
@@ -7,6 +7,8 @@
#define OveroLinkEvent(_data_received_handler, _crc_failed_handler) { \
if (overo_link.status == DATA_AVAILABLE) { \
overo_link.timeout = 0; \
+ /* FIXME : we should probably add a limit here and do something */\
+ /* radical in case we exceed it */ \
while(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE)==RESET); \
while(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_BSY)==SET); \
uint8_t foo __attribute__ ((unused)) = SPI_I2S_ReceiveData(SPI1); \
@@ -19,6 +21,9 @@
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_arch_prepare_next_transfert(0); \
overo_link.status = IDLE;
\
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5288] still fighting with resync,
antoine drouin <=