29 lines
476 B
C
29 lines
476 B
C
#include "CAN_Test.h"
|
|
#include "drvCAN.h"
|
|
#include "cmsis_os2.h"
|
|
#include "main.h"
|
|
|
|
static const osThreadAttr_t task_attrs = {
|
|
.stack_size = 256
|
|
};
|
|
|
|
static void CAN_Test_Task(void *arg)
|
|
{
|
|
(void) arg;
|
|
|
|
for ( ; ; )
|
|
{
|
|
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_SET);
|
|
osDelay(100);
|
|
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);
|
|
osDelay(100);
|
|
}
|
|
}
|
|
|
|
void CAN_Test_Init(void)
|
|
{
|
|
(void) drvCAN_Init();
|
|
|
|
osThreadNew(CAN_Test_Task, (void *) 0, &task_attrs);
|
|
}
|