mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
test(BitScrambler): added more basic test cases
e.g. to test different eof mode, prefetch mode
This commit is contained in:
@@ -280,6 +280,21 @@ static inline bitscrambler_state_t bitscrambler_ll_get_current_state(bitscramble
|
||||
return BITSCRAMBLER_STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return if the bitscrambler FIFO is ready
|
||||
*
|
||||
* @note For TX, means the outfifo is not empty, then we can start the peripheral to transmit the data
|
||||
* For RX, means the infifo is not full, then we can start the peripheral to receive the data
|
||||
*
|
||||
* @param hw BitScrambler hardware instance address.
|
||||
* @param dir Direction, BITSCRAMBLER_DIR_TX or BITSCRAMBLER_DIR_RX
|
||||
* @return true if FIFO is ready, false otherwise
|
||||
*/
|
||||
static inline bool bitscrambler_ll_is_fifo_ready(bitscrambler_dev_t *hw, bitscrambler_direction_t dir)
|
||||
{
|
||||
return hw->state[dir].fifo_empty;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable the bus clock for BitScrambler module
|
||||
*/
|
||||
|
@@ -280,6 +280,21 @@ static inline bitscrambler_state_t bitscrambler_ll_get_current_state(bitscramble
|
||||
return BITSCRAMBLER_STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return if the bitscrambler FIFO is ready
|
||||
*
|
||||
* @note For TX, means the outfifo is not empty, then we can start the peripheral to transmit the data
|
||||
* For RX, means the infifo is not full, then we can start the peripheral to receive the data
|
||||
*
|
||||
* @param hw BitScrambler hardware instance address.
|
||||
* @param dir Direction, BITSCRAMBLER_DIR_TX or BITSCRAMBLER_DIR_RX
|
||||
* @return true if FIFO is ready, false otherwise
|
||||
*/
|
||||
static inline bool bitscrambler_ll_is_fifo_ready(bitscrambler_dev_t *hw, bitscrambler_direction_t dir)
|
||||
{
|
||||
return hw->state[dir].fifo_empty;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable the bus clock for BitScrambler module
|
||||
*/
|
||||
|
@@ -62,6 +62,9 @@ typedef enum {
|
||||
|
||||
/**
|
||||
* @brief Commands to set the state of bitscrambler
|
||||
*
|
||||
* @note Pause->Run, bitscrambler can continue from the last instruction;
|
||||
* Halt->Run, bitscrambler will start from the first instruction;
|
||||
*/
|
||||
typedef enum {
|
||||
BITSCRAMBLER_SET_STATE_RUN, /*!< Run */
|
||||
|
Reference in New Issue
Block a user