1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-19 09:54:15 +01:00

Flight/PiOS Remove use of semaphores in COM/USB ISR (not used and not working also causing random crashes)

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@540 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
vassilis 2010-04-25 02:17:25 +00:00 committed by vassilis
parent ecb83a52d3
commit 4f0377194d
4 changed files with 0 additions and 32 deletions

View File

@ -34,9 +34,6 @@
/* Global Variables */
xSemaphoreHandle PIOS_USART1_Buffer;
xSemaphoreHandle PIOS_USART2_Buffer;
xSemaphoreHandle PIOS_USART3_Buffer;
static portBASE_TYPE xHigherPriorityTaskWoken;
/* Local Variables */
@ -181,9 +178,6 @@ void PIOS_USART_Init(void)
USART_Cmd(PIOS_USART3_USART, ENABLE);
#endif
vSemaphoreCreateBinary(PIOS_USART1_Buffer);
vSemaphoreCreateBinary(PIOS_USART2_Buffer);
vSemaphoreCreateBinary(PIOS_USART3_Buffer);
}
/**
@ -346,19 +340,6 @@ int32_t PIOS_USART_RxBufferPut(USARTNumTypeDef usart, uint8_t b)
++rx_buffer_size[usart];
PIOS_IRQ_Enable();
switch(usart) {
case USART_1:
xSemaphoreGiveFromISR(PIOS_USART1_Buffer, &xHigherPriorityTaskWoken);
break;
case USART_2:
xSemaphoreGiveFromISR(PIOS_USART2_Buffer, &xHigherPriorityTaskWoken);
break;
case USART_3:
xSemaphoreGiveFromISR(PIOS_USART3_Buffer, &xHigherPriorityTaskWoken);
break;
}
/* No error */
return 0;
}

View File

@ -45,8 +45,6 @@ typedef enum _HID_REQUESTS {
} HID_REQUESTS;
/* Global Variables */
xSemaphoreHandle PIOS_HID_Buffer;
static portBASE_TYPE xHigherPriorityTaskWoken;
/* Local Variables */
static uint32_t ProtocolValue;
@ -102,8 +100,6 @@ int32_t PIOS_USB_HID_Init(uint32_t mode)
return -1;
}
vSemaphoreCreateBinary(PIOS_HID_Buffer);
return 0; /* No error */
}
@ -317,7 +313,6 @@ void PIOS_USB_HID_EP1_OUT_Callback(void)
/* We now have data waiting */
rx_buffer_new_data_ctr = PIOS_USB_HID_DATA_LENGTH;
xSemaphoreGiveFromISR(PIOS_HID_Buffer, &xHigherPriorityTaskWoken);
#else
// FOR DEBUGGING USE ONLY

View File

@ -31,11 +31,6 @@
/* Global Types */
typedef enum {USART_1 = 0, USART_2 = 1, USART_3 = 2} USARTNumTypeDef;
/* Global Variables */
extern xSemaphoreHandle PIOS_USART1_Buffer;
extern xSemaphoreHandle PIOS_USART2_Buffer;
extern xSemaphoreHandle PIOS_USART3_Buffer;
/* Public Functions */
extern void PIOS_USART_Init(void);
extern void PIOS_USART_ChangeBaud(USART_TypeDef* USARTx, uint32_t Baud);

View File

@ -36,9 +36,6 @@
#define PIOS_USB_HID_DATA_LENGTH 63
/* Global Variables */
extern xSemaphoreHandle PIOS_HID_Buffer;
/* Global functions */
extern int32_t PIOS_USB_HID_Init(uint32_t mode);
extern int32_t PIOS_USB_HID_ChangeConnectionState(uint32_t Connected);