Files
stm32f407ve_black/BSP/Inc/bsp_board_manager.h
2026-01-23 14:35:51 +08:00

64 lines
1.7 KiB
C

/* 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 HAL status code
*/
hal_ret_t bsp_board_set_by_index(uint8_t index);
/**
* @brief Set current board configuration by name
* @param name: Board name string
* @retval HAL status code
*/
hal_ret_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 */