Create message queues for saving CAN frames
This commit is contained in:
@@ -24,6 +24,10 @@
|
|||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
/* Decladerations for queues */
|
||||||
|
extern osMessageQueueId_t xCAN1RxQueue;
|
||||||
|
extern osMessageQueueId_t xCAN2RxQueue;
|
||||||
|
|
||||||
/* Decladerations for thread handles and attributes */
|
/* Decladerations for thread handles and attributes */
|
||||||
extern osThreadId_t vCAN1_rx;
|
extern osThreadId_t vCAN1_rx;
|
||||||
extern osThreadId_t vCAN2_rx;
|
extern osThreadId_t vCAN2_rx;
|
||||||
|
|||||||
+7
-2
@@ -159,8 +159,13 @@ int main(void)
|
|||||||
/* USER CODE END RTOS_TIMERS */
|
/* USER CODE END RTOS_TIMERS */
|
||||||
|
|
||||||
/* USER CODE BEGIN RTOS_QUEUES */
|
/* USER CODE BEGIN RTOS_QUEUES */
|
||||||
QueueHandle_t xCAN1rxQueue;
|
osMessageQueueId_t xCAN1RxQueue;
|
||||||
QueueHandle_t xCAN2rxQueue;
|
xCAN1RxQueue = osMessageQueueNew(32, sizeof(CanMessage_t), NULL);
|
||||||
|
|
||||||
|
osMessageQueueId_t xCAN2RxQueue;
|
||||||
|
xCAN2RxQueue = osMessageQueueNew(32, sizeof(CanMessage_t), NULL);
|
||||||
|
|
||||||
|
if (xCAN1RxQueue == NULL || xCAN2RxQueue == NULL) Error_Handler();
|
||||||
/* USER CODE END RTOS_QUEUES */
|
/* USER CODE END RTOS_QUEUES */
|
||||||
|
|
||||||
/* USER CODE BEGIN RTOS_THREADS */
|
/* USER CODE BEGIN RTOS_THREADS */
|
||||||
|
|||||||
Reference in New Issue
Block a user