Bridgetek / ft9xx-sdk

ft90x SDK
MIT License
6 stars 0 forks source link

Add size of FIFO buffer for I2S interface #43

Closed brtchip-gdm closed 9 months ago

brtchip-gdm commented 10 months ago

Add a macro in include/registers/ft900_i2s_registers.h to indicate the total size of the I2S FIFO buffers.

/**
    @name    Definitions for I2S FIFO sizes.
    @details Definitions for size of the transmit and receive FIFOs available for the I2S interface.
             There are 2 kB of FIFO for both receiving and transmitting channels on I2S
 **/
//@{
#define I2S_FIFO_READ (2048)
#define I2S_FIFO_WRITE (2048)
//@}
brtchip-gdm commented 10 months ago

We should also add an explanation of the algorithm used to send 24-bit data to the I2Sbus to the header file comments. It expands 24 bit data into padded 32 bit data as it writes to the I2S FIFO. Additionally the typedef enum of i2s_bclk_div is missing a _t at the end of the name.

/** @brief I2S BCLK speed definitions */
typedef enum
{
...
} i2s_bclk_div_t;
brtchip-gdm commented 9 months ago

@BrtChipDatHoTan please review and close if acceptable. Note deprecated typedef to not break existing API.

BrtChipDatHoTan commented 9 months ago

I have reviewed it and it looks good