[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5345] removed the first generation crc error handli
From: |
antoine drouin |
Subject: |
[paparazzi-commits] [5345] removed the first generation crc error handling |
Date: |
Thu, 12 Aug 2010 18:47:03 +0000 |
Revision: 5345
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5345
Author: poine
Date: 2010-08-12 18:47:03 +0000 (Thu, 12 Aug 2010)
Log Message:
-----------
removed the first generation crc error handling
Modified Paths:
--------------
paparazzi3/trunk/sw/airborne/lisa/arch/stm32/lisa_overo_link_arch.h
Modified: paparazzi3/trunk/sw/airborne/lisa/arch/stm32/lisa_overo_link_arch.h
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/arch/stm32/lisa_overo_link_arch.h
2010-08-12 17:24:15 UTC (rev 5344)
+++ paparazzi3/trunk/sw/airborne/lisa/arch/stm32/lisa_overo_link_arch.h
2010-08-12 18:47:03 UTC (rev 5345)
@@ -4,14 +4,6 @@
#include <stm32/spi.h>
-#if 1
-
-/*
- *
- * This is the version that got less tested
- *
- */
-
#define OveroLinkEvent(_data_received_handler, _crc_failed_handler) { \
if (overo_link.status == DATA_AVAILABLE) { /* set by DMA
interrupt */ \
while(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE)==RESET); \
@@ -47,46 +39,7 @@
}
-#else
-/*
- *
- * This is the version that works
- *
- */
-
-#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);
\
- if((SPI_I2S_GetFlagStatus(SPI1, SPI_FLAG_CRCERR)) == RESET) { \
- LED_TOGGLE(OVERO_LINK_LED_OK); \
- LED_OFF(OVERO_LINK_LED_KO); \
- _data_received_handler(); \
- }
\
- else { \
- LED_OFF(OVERO_LINK_LED_OK); \
- LED_ON(OVERO_LINK_LED_KO); \
- overo_link.crc_err_cnt++; \
- _crc_failed_handler(); \
- /* wait until we're not selected - same thing, we would */ \
- /* probably want a limit here */ \
- while (!GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_4)); \
- uint8_t foo2 __attribute__ ((unused)) = SPI_I2S_ReceiveData(SPI1); \
- violently_reset_spi(); \
- }
\
- overo_link.msg_cnt++; \
- overo_link_arch_prepare_next_transfert();
\
- overo_link.status = IDLE;
\
- } \
- }
-#endif
-
-
#define violently_reset_spi() {
\
SPI_Cmd(SPI1, DISABLE); \
SPI_I2S_DeInit(SPI1); \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5345] removed the first generation crc error handling,
antoine drouin <=