mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-22 20:59:03 +00:00
[sync] sync from internal repo
* use nuttx libc, disable system libc * use tlsf as default * update lhal flash driver * add example readme * add flash ini for new flash tool * add fw header for new flash tool
This commit is contained in:
parent
89592fc9a3
commit
356f258e83
554 changed files with 79150 additions and 46596 deletions
|
@ -102,7 +102,7 @@
|
|||
/**
|
||||
* @brief IR TX configuration structure
|
||||
*
|
||||
* @param tx_mode TX mode select,NEC protocol/RC-5 protocol/software mode/customize
|
||||
* @param tx_mode TX mode select, use @ref IR_TX_MODE
|
||||
* @param data_bits Bit count of data phase (don't care if tx freerun mode is enabled)
|
||||
* @param tail_inverse Enable or disable signal of tail pulse inverse (don't care if SWM is enabled)
|
||||
* @param tail_enable Enable or disable signal of tail pulse (don't care if SWM is enabled)
|
||||
|
@ -116,7 +116,7 @@
|
|||
* @param output_inverse Enable or disable signal of output inverse,0:output stays at low during idle state,1:stay at high
|
||||
* @param freerun_enable Enable or disable tx freerun mode (don't care if SWM is enabled)
|
||||
* @param continue_enable Disable:idle time between frames = (tailPulseWidth_0+tailPulseWidth_1)*pulseWidthUnit,Enable:no idle time between frames
|
||||
* @param fifo_width IR frame size(also the valid width for each fifo entry)
|
||||
* @param fifo_width IR frame size(also the valid width for each fifo entry), use @ref IR_TX_FIFO_WIDTH
|
||||
* @param fifo_threshold TX FIFO threshold
|
||||
* @param logic0_pulse_width_1 Pulse width of logic 0 pulse phase 1 (don't care if SWM is enabled)
|
||||
* @param logic0_pulse_width_0 Pulse width of logic 0 pulse phase 0 (don't care if SWM is enabled)
|
||||
|
@ -165,7 +165,7 @@ struct bflb_ir_tx_config_s {
|
|||
/**
|
||||
* @brief IR RX configuration structure
|
||||
*
|
||||
* @param rx_mode RX mode select,NEC protocol/RC-5 protocol/software mode
|
||||
* @param rx_mode RX mode select, use @ref IR_RX_MODE
|
||||
* @param input_inverse Enable or disable signal of input inverse
|
||||
* @param deglitch_enable Enable or disable signal of rx input de-glitch function
|
||||
* @param deglitch_cnt De-glitch function cycle count
|
||||
|
@ -190,84 +190,84 @@ extern "C" {
|
|||
|
||||
#if !defined(BL616)
|
||||
/**
|
||||
* @brief
|
||||
* @brief Initialize ir tx.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] config
|
||||
* @param [in] dev device handle
|
||||
* @param [in] config pointer to ir tx configure structure
|
||||
*/
|
||||
void bflb_ir_tx_init(struct bflb_device_s *dev, const struct bflb_ir_tx_config_s *config);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Send data in NEC/RC5/customize mode.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] data
|
||||
* @param [in] length
|
||||
* @param [in] dev device handle
|
||||
* @param [in] data data buffer to send
|
||||
* @param [in] length length of data buffer
|
||||
*/
|
||||
void bflb_ir_send(struct bflb_device_s *dev, uint32_t *data, uint32_t length);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Send data in software mode.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] data
|
||||
* @param [in] length
|
||||
* @param [in] dev device handle
|
||||
* @param [in] data data data buffer to send
|
||||
* @param [in] length length of data buffer
|
||||
*/
|
||||
void bflb_ir_swm_send(struct bflb_device_s *dev, uint16_t *data, uint8_t length);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Enable or disable ir tx.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] enable
|
||||
* @param [in] dev device handle
|
||||
* @param [in] enable enable or disable
|
||||
*/
|
||||
void bflb_ir_tx_enable(struct bflb_device_s *dev, bool enable);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Mask or unmask ir tx interrupt.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] int_type
|
||||
* @param [in] mask
|
||||
* @param [in] dev device handle
|
||||
* @param [in] int_type ir tx interrupt type, use @ref IR_TX_INTEN
|
||||
* @param [in] mask mask or unmask
|
||||
*/
|
||||
void bflb_ir_txint_mask(struct bflb_device_s *dev, uint8_t int_type, bool mask);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Get ir tx interrupt status.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @return uint32_t
|
||||
* @param [in] dev device handle
|
||||
* @return Ir tx interrupt status
|
||||
*/
|
||||
uint32_t bflb_ir_get_txint_status(struct bflb_device_s *dev);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Clear ir tx interrupt.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] dev device handle
|
||||
*/
|
||||
void bflb_ir_txint_clear(struct bflb_device_s *dev);
|
||||
|
||||
#if !defined(BL602) && !defined(BL702)
|
||||
/**
|
||||
* @brief
|
||||
* @brief Enable or disable ir tx dma mode.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] enable
|
||||
* @param [in] dev device handle
|
||||
* @param [in] enable enable or disable
|
||||
*/
|
||||
void bflb_ir_link_txdma(struct bflb_device_s *dev, bool enable);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Get ir tx fifo available count.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @return uint8_t
|
||||
* @param [in] dev device handle
|
||||
* @return Ir tx fifo available count
|
||||
*/
|
||||
uint8_t bflb_ir_get_txfifo_cnt(struct bflb_device_s *dev);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Clear ir tx fifo.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] dev device handle
|
||||
*/
|
||||
void bflb_ir_txfifo_clear(struct bflb_device_s *dev);
|
||||
#endif
|
||||
|
@ -275,88 +275,88 @@ void bflb_ir_txfifo_clear(struct bflb_device_s *dev);
|
|||
|
||||
#if !defined(BL702L)
|
||||
/**
|
||||
* @brief
|
||||
* @brief Initialize ir rx.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] config
|
||||
* @param [in] dev device handle
|
||||
* @param [in] config config pointer to ir rx configure structure
|
||||
*/
|
||||
void bflb_ir_rx_init(struct bflb_device_s *dev, const struct bflb_ir_rx_config_s *config);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Receive data in NEC/RC5/customize mode.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] data
|
||||
* @return uint8_t
|
||||
* @param [in] dev device handle
|
||||
* @param [out] data data received
|
||||
* @return Bit count of data received
|
||||
*/
|
||||
uint8_t bflb_ir_receive(struct bflb_device_s *dev, uint64_t *data);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Receive data in software mode.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] data
|
||||
* @param [in] length
|
||||
* @return uint8_t
|
||||
* @param [in] dev device handle
|
||||
* @param [out] data data buffer to receive
|
||||
* @param [in] length of data buffer
|
||||
* @return Length of data received
|
||||
*/
|
||||
uint8_t bflb_ir_swm_receive(struct bflb_device_s *dev, uint16_t *data, uint8_t length);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Enable or disable ir rx.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] enable
|
||||
* @param [in] dev device handle
|
||||
* @param [in] enable enable or disable
|
||||
*/
|
||||
void bflb_ir_rx_enable(struct bflb_device_s *dev, bool enable);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Get ir rx fifo available count.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @return uint8_t
|
||||
* @param [in] dev device handle
|
||||
* @return Ir rx fifo available count
|
||||
*/
|
||||
uint8_t bflb_ir_get_rxfifo_cnt(struct bflb_device_s *dev);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Clear ir rx fifo.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] dev device handle
|
||||
*/
|
||||
void bflb_ir_rxfifo_clear(struct bflb_device_s *dev);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Mask ir rx interrupt.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] int_type
|
||||
* @param [in] mask
|
||||
* @param [in] dev device handle
|
||||
* @param [in] int_type ir rx interrupt type, use @ref IR_RX_INTEN
|
||||
* @param [in] mask mask or unmask
|
||||
*/
|
||||
void bflb_ir_rxint_mask(struct bflb_device_s *dev, uint8_t int_type, bool mask);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Get ir rx interrupt status.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @return uint32_t
|
||||
* @param [in] dev device handle
|
||||
* @return Ir rx interrupt status
|
||||
*/
|
||||
uint32_t bflb_ir_get_rxint_status(struct bflb_device_s *dev);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Clear ir rx interrupt.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] dev device handle
|
||||
*/
|
||||
void bflb_ir_rxint_clear(struct bflb_device_s *dev);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Control ir feature.
|
||||
*
|
||||
* @param [in] dev
|
||||
* @param [in] cmd
|
||||
* @param [in] arg
|
||||
* @return int
|
||||
* @param [in] dev device handle
|
||||
* @param [in] cmd feature command
|
||||
* @param [in] arg user data
|
||||
* @return A negated errno value on failure
|
||||
*/
|
||||
int bflb_ir_feature_control(struct bflb_device_s *dev, int cmd, size_t arg);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue