CAN: Add functions to clear queues and fix multiple bugs

This commits adds the functions can_clear_transmit_queue() and
can_clear_receive_queue(). Closes #2906

The following bug are fixed:

- CAN_IO_UNUSED is now explicitly cast to enum type. Closes #2825
- Fix multiple documentation errors. Closes #2898, Closes #2794
- can_reconfigure_alerts() returns incorrect current_alerts. Closes #3028
- Add missing header file. Closes #3065
This commit is contained in:
Darian Leung
2019-02-11 14:57:43 +08:00
parent bcc21d2262
commit 099b83af67
4 changed files with 185 additions and 253 deletions

View File

@@ -131,7 +131,8 @@ static void can_receive_task(void *arg)
vTaskDelete(NULL);
}
static void can_transmit_task(void *arg) {
static void can_transmit_task(void *arg)
{
while (1) {
tx_task_action_t action;
xQueueReceive(tx_task_queue, &action, portMAX_DELAY);
@@ -158,7 +159,8 @@ static void can_transmit_task(void *arg) {
vTaskDelete(NULL);
}
void can_control_task(void *arg) {
static void can_control_task(void *arg)
{
xSemaphoreTake(ctrl_task_sem, portMAX_DELAY);
tx_task_action_t tx_action;
rx_task_action_t rx_action;