[update][lhal] update lhal

* update lhal api comments
* add cam driver
* add efuse driver
* add iso11898 driver
This commit is contained in:
jzlv 2022-12-21 20:20:33 +08:00
parent 185805cbbe
commit a77b0dc866
60 changed files with 8782 additions and 429 deletions

View file

@ -3,8 +3,16 @@
#include "bflb_core.h"
/** @addtogroup LHAL
* @{
*/
/** @addtogroup IR
* @{
*/
#if !defined(BL616)
/** @defgroup IR TX mode definition
/** @defgroup IR_TX_MODE ir tx mode definition
* @{
*/
#define IR_TX_NEC 0
@ -15,7 +23,7 @@
* @}
*/
/** @defgroup IR TX FIFO valid width definition
/** @defgroup IR_TX_FIFO_WIDTH ir tx fifo width valid width definition
* @{
*/
#if !defined(BL602) && !defined(BL702)
@ -28,21 +36,34 @@
* @}
*/
/** @defgroup IR TX interrupt type definition
/** @defgroup IR_TX_INTEN ir tx interrupt enable definition
* @{
*/
#define IR_TX_INT_END (1 << 0)
#define IR_TX_INTEN_END (1 << 0)
#if !defined(BL602) && !defined(BL702)
#define IR_TX_INT_FIFO (1 << 1)
#define IR_TX_INT_FER (1 << 2)
#define IR_TX_INTEN_FIFO (1 << 1)
#define IR_TX_INTEN_FER (1 << 2)
#endif
/**
* @}
*/
/** @defgroup IR_TX_INTSTS ir tx interrupt status definition
* @{
*/
#define IR_TX_INTSTS_END (1 << 0)
#if !defined(BL602) && !defined(BL702)
#define IR_TX_INTSTS_FIFO (1 << 1)
#define IR_TX_INTSTS_FER (1 << 2)
#endif
/**
* @}
*/
#endif
#if !defined(BL702L)
/** @defgroup IR RX mode definition
/** @defgroup IR_RX_MODE ir rx mode definition
* @{
*/
#define IR_RX_NEC 0
@ -52,13 +73,25 @@
* @}
*/
/** @defgroup IR RX interrupt type definition
/** @defgroup IR_RX_INTEN ir rx interrupt enable definition
* @{
*/
#define IR_RX_INT_END (1 << 0)
#define IR_RX_INTEN_END (1 << 0)
#if !defined(BL602) && !defined(BL702)
#define IR_RX_INT_FIFO (1 << 1)
#define IR_RX_INT_FER (1 << 2)
#define IR_RX_INTEN_FIFO (1 << 1)
#define IR_RX_INTEN_FER (1 << 2)
#endif
/**
* @}
*/
/** @defgroup IR_RX_INTSTS ir rx interrupt status definition
* @{
*/
#define IR_RX_INTSTS_END (1 << 0)
#if !defined(BL602) && !defined(BL702)
#define IR_RX_INTSTS_FIFO (1 << 1)
#define IR_RX_INTSTS_FER (1 << 2)
#endif
/**
* @}
@ -156,36 +189,187 @@ extern "C" {
#endif
#if !defined(BL616)
/**
* @brief
*
* @param [in] dev
* @param [in] config
*/
void bflb_ir_tx_init(struct bflb_device_s *dev, const struct bflb_ir_tx_config_s *config);
/**
* @brief
*
* @param [in] dev
* @param [in] data
* @param [in] length
*/
void bflb_ir_send(struct bflb_device_s *dev, uint32_t *data, uint32_t length);
/**
* @brief
*
* @param [in] dev
* @param [in] data
* @param [in] length
*/
void bflb_ir_swm_send(struct bflb_device_s *dev, uint16_t *data, uint8_t length);
/**
* @brief
*
* @param [in] dev
* @param [in] enable
*/
void bflb_ir_tx_enable(struct bflb_device_s *dev, bool enable);
/**
* @brief
*
* @param [in] dev
* @param [in] int_type
* @param [in] mask
*/
void bflb_ir_txint_mask(struct bflb_device_s *dev, uint8_t int_type, bool mask);
/**
* @brief
*
* @param [in] dev
* @return uint32_t
*/
uint32_t bflb_ir_get_txint_status(struct bflb_device_s *dev);
/**
* @brief
*
* @param [in] dev
*/
void bflb_ir_txint_clear(struct bflb_device_s *dev);
uint32_t bflb_ir_txint_status(struct bflb_device_s *dev);
#if !defined(BL602) && !defined(BL702)
/**
* @brief
*
* @param [in] dev
* @param [in] enable
*/
void bflb_ir_link_txdma(struct bflb_device_s *dev, bool enable);
uint8_t bflb_ir_txfifo_cnt(struct bflb_device_s *dev);
/**
* @brief
*
* @param [in] dev
* @return uint8_t
*/
uint8_t bflb_ir_get_txfifo_cnt(struct bflb_device_s *dev);
/**
* @brief
*
* @param [in] dev
*/
void bflb_ir_txfifo_clear(struct bflb_device_s *dev);
#endif
#endif
#if !defined(BL702L)
/**
* @brief
*
* @param [in] dev
* @param [in] config
*/
void bflb_ir_rx_init(struct bflb_device_s *dev, const struct bflb_ir_rx_config_s *config);
/**
* @brief
*
* @param [in] dev
* @param [in] data
* @return uint8_t
*/
uint8_t bflb_ir_receive(struct bflb_device_s *dev, uint64_t *data);
/**
* @brief
*
* @param [in] dev
* @param [in] data
* @param [in] length
* @return uint8_t
*/
uint8_t bflb_ir_swm_receive(struct bflb_device_s *dev, uint16_t *data, uint8_t length);
/**
* @brief
*
* @param [in] dev
* @param [in] enable
*/
void bflb_ir_rx_enable(struct bflb_device_s *dev, bool enable);
void bflb_ir_rxint_mask(struct bflb_device_s *dev, uint8_t int_type, bool mask);
void bflb_ir_rxint_clear(struct bflb_device_s *dev);
uint32_t bflb_ir_rxint_status(struct bflb_device_s *dev);
uint8_t bflb_ir_rxfifo_cnt(struct bflb_device_s *dev);
/**
* @brief
*
* @param [in] dev
* @return uint8_t
*/
uint8_t bflb_ir_get_rxfifo_cnt(struct bflb_device_s *dev);
/**
* @brief
*
* @param [in] dev
*/
void bflb_ir_rxfifo_clear(struct bflb_device_s *dev);
/**
* @brief
*
* @param [in] dev
* @param [in] int_type
* @param [in] mask
*/
void bflb_ir_rxint_mask(struct bflb_device_s *dev, uint8_t int_type, bool mask);
/**
* @brief
*
* @param [in] dev
* @return uint32_t
*/
uint32_t bflb_ir_get_rxint_status(struct bflb_device_s *dev);
/**
* @brief
*
* @param [in] dev
*/
void bflb_ir_rxint_clear(struct bflb_device_s *dev);
#endif
void bflb_ir_feature_control();
/**
* @brief
*
* @param [in] dev
* @param [in] cmd
* @param [in] arg
* @return int
*/
int bflb_ir_feature_control(struct bflb_device_s *dev, int cmd, size_t arg);
#ifdef __cplusplus
}
#endif
/**
* @}
*/
/**
* @}
*/
#endif