/**
 * @file           bsp_boardcheck.h
 * @brief          
 * @author         plyang
 * @version        1.0
 * @date           20230427
 * 
 * @copyright Copyright (c) 2026 by OLE, All Rights Reserved.
 * 
 * @par ????:
 * <table>
 * <tr><th>Date        <th>Version         <th>Author          <th>Description
 * <tr><td>20230427    <td>2.0             <td>test            <td>??
 * </table>
 */

#ifndef __BSP_BOARDCHECK_H
#define __BSP_BOARDCHECK_H

/**
 * @brief
 *
 */
typedef struct
{
    uint8_t board_state; // ????
    uint8_t board_up;    // ??????
    uint8_t board_down;  // ????????
    uint32_t time;       // ????
    uint32_t setTime;    // ????

} t_bsp_boardcheck;

/**
 * @defgroup board_check  BOARD CHECK
 * ????
 * @{
 */

typedef enum
{
    BOARD_DI = 0, /**<???*/
    BOARD_AC,     /**<???*/
    BOARD_DO,     /**<???*/
    // BOARD_KEY,    /**<???*/
    BOAED_NUM
} te_board_check;

/**
 * @brief ??????
 *
 * @return int
 * @remark ?????? (50-200ms)
 */
extern int bsp_board_check(void);

/**
 * @brief ????????
 *
 * @param n ???? [0-3][BOARD_DI~BOARD_DO]
 * @return int ?????1 ?????0
 */
extern int bap_get_board_state(uint8_t n);

extern int bapbcio_get_board_state(uint8_t n);

/**
 * @brief ???????
 *
 * @return int ????
 */
extern int bsp_board_init(void);

#endif

/**
 * @}
 *
 */
