优化实现串口驱动,SPI驱动 W25QXX还需要初始化验证修复

This commit is contained in:
冯佳
2026-01-23 09:59:43 +08:00
parent 51e8d79f78
commit b166bee1a9
69 changed files with 6253 additions and 1178 deletions

View File

@ -0,0 +1,63 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : bsp_board_manager.h
* @brief : Board support package manager header file
******************************************************************************
*/
/* USER CODE END Header */
#ifndef BSP_BOARD_MANAGER_H
#define BSP_BOARD_MANAGER_H
#include <stdint.h>
#include <string.h>
#include "bsp_board.h"
/**
* @brief Get number of supported boards
* @retval Number of supported boards
*/
uint8_t bsp_board_get_count(void);
/**
* @brief Get board configuration by index
* @param index: Board configuration index
* @retval Pointer to board configuration structure, NULL if invalid index
*/
const bsp_board_config_t* bsp_board_get_by_index(uint8_t index);
/**
* @brief Get board configuration by name
* @param name: Board name string
* @retval Pointer to board configuration structure, NULL if not found
*/
const bsp_board_config_t* bsp_board_get_by_name(const char* name);
/**
* @brief Set current board configuration by index
* @param index: Board configuration index
* @retval 0 if successful, -1 if invalid index
*/
int8_t bsp_board_set_by_index(uint8_t index);
/**
* @brief Set current board configuration by name
* @param name: Board name string
* @retval 0 if successful, -1 if not found
*/
int8_t bsp_board_set_by_name(const char* name);
/**
* @brief Get current board configuration
* @retval Pointer to current board configuration structure
*/
const bsp_board_config_t* bsp_board_get_config(void);
/**
* @brief Get current board index
* @retval Current board index
*/
uint8_t bsp_board_get_current_index(void);
#endif /* BSP_BOARD_MANAGER_H */