mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-25 03:47:47 +08:00
修改freertos时基心跳为tim14,更新引脚lable
This commit is contained in:
@@ -23,7 +23,7 @@ typedef struct _
|
||||
uint8_t rx_len; // 接收长度,可能为0-8
|
||||
// 接收的回调函数,用于解析接收到的数据
|
||||
void (*can_module_callback)(struct _ *); // callback needs an instance to tell among registered ones
|
||||
void *id; // 使用can外设的
|
||||
void *id; // 使用can外设的模块指针(即id指向的模块拥有此can实例,是父子关系)
|
||||
} CANInstance;
|
||||
#pragma pack()
|
||||
|
||||
|
||||
@@ -128,10 +128,11 @@ void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi)
|
||||
if (spi_instance[i]->spi_handle == hspi && // 显然同一时间一条总线只能有一个从机在接收数据
|
||||
HAL_GPIO_ReadPin(spi_instance[i]->GPIO_cs, spi_instance[i]->cs_pin) == GPIO_PIN_RESET)
|
||||
{
|
||||
// 先拉高片选,结束传输,在判断是否有回调函数,如果有则调用回调函数
|
||||
HAL_GPIO_WritePin(spi_instance[i]->GPIO_cs, spi_instance[i]->cs_pin, GPIO_PIN_SET);
|
||||
if (spi_instance[i]->callback != NULL) // 回调函数不为空, 则调用回调函数
|
||||
{
|
||||
// 先拉高片选,结束传输
|
||||
HAL_GPIO_WritePin(spi_instance[i]->GPIO_cs, spi_instance[i]->cs_pin, GPIO_PIN_SET);
|
||||
|
||||
spi_instance[i]->callback(spi_instance[i]);
|
||||
}
|
||||
return;
|
||||
|
||||
1
bsp/usb/bsp_usb.c
Normal file
1
bsp/usb/bsp_usb.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "bsp_usb.h"
|
||||
5
bsp/usb/bsp_usb.h
Normal file
5
bsp/usb/bsp_usb.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "usb_device.h"
|
||||
#include "usbd_cdc.h"
|
||||
#include "usbd_conf.h"
|
||||
#include "usbd_desc.h"
|
||||
|
||||
Reference in New Issue
Block a user