TI中文支持网
TI专业的中文技术问题搜集分享网站

I2S使用

Dear All:

              请问在使用I2S时,调用的Driver里的 I2S.c 和 I2S.h 然后添加定义时,这里不像I2C或者SPI那样有 I2CCC26XX.c等文件驱动可以声明应用

/*
* =============================== I2C ===============================
*/
#include <ti/drivers/I2C.h>
#include <ti/drivers/i2c/I2CCC26XX.h>

I2CCC26XX_Object i2cCC26xxObjects[CC2640R2_LAUNCHXL_I2CCOUNT];

请问在使用I2S时该如何配置 ???

Asheng Lin:

这里只想使用I2S做为单总线使用,不想用来做PDM 硅麦的接收。。请问TI可否给出类似 I2SCC26XX.c 和 I2SCC26XX.h的驱动文件,谢谢!

Viki Shi:

CC26XX的I2S文件请参考如下链接:

file:///C:/ti/simplelink_cc13x0_sdk_1_00_00_13/docs/driverlib_cc13xx_cc26xx/cc26x0/driverlib/i2s_8c.html

file:///C:/ti/simplelink_cc13x0_sdk_1_00_00_13/docs/driverlib_cc13xx_cc26xx/cc26x0/driverlib/i2s_8h.html

Asheng Lin:

回复 Viki Shi:

你给的这个跟我自己看 驱动里的 I2S.c  和 I2S.h 有什么区别啊?完全就是代码复制粘贴一遍。。而且他这里的I2S.c  跟 drivers里面的I2S.c不一样。我想要的是

/*! * @brief Function to queue a buffer of data to the I2S in callback mode * for reading. * * @param handle A I2S_Handle * * @param desc A pointer to a I2S_BufDesc object. The bufPtr * and bufSize fields must be set to a buffer and the * size of the buffer before passing to this function. * @return Returns 0 if successful else would return * I2S_STATUS_UNDEFINEDCMD on an error. */extern int_fast16_t I2S_read(I2S_Handle handle, I2S_BufDesc *desc);

/*!

* @brief Function to queue a buffer of data to the I2S in Issue/Reclaim * mode for reading. * * @param handle A I2S_Handle * * @param desc A pointer to a I2S_BufDesc object. The bufPtr * and bufSize fields must be set to a buffer and the * size of the buffer before passing to this function. * @return Returns 0 if successful else would return * I2S_STATUS_UNDEFINEDCMD on an error. */

extern int_fast16_t I2S_readIssue(I2S_Handle handle, I2S_BufDesc *desc);

/*! * @brief Function to retrieve a full buffer of data read by the I2S. * * @param handle A I2S_Handle * * @param pDesc A pointer to a I2S_BufDesc pointer. * * @return Returns the number of bytes read from the I2S, or 0 on timeout. */extern size_t I2S_readReclaim(I2S_Handle handle, I2S_BufDesc **pDesc);

/*! * @brief Function to queue a buffer of data to the I2S in * callback mode for writing. * * @param handle A I2S_Handle * * @param desc A pointer to a I2S_BufDesc object. The bufPtr * and bufSize fields must be set to a buffer and the * size of the buffer before passing to this function. * @return Returns 0 if successful else would return * I2S_STATUS_UNDEFINEDCMD on an error. */extern int_fast16_t I2S_write(I2S_Handle handle, I2S_BufDesc *desc);

/*! * @brief Function to queue a buffer of data to the I2S in * Issue/Reclaim mode for writing. * * @param handle A I2S_Handle * * @param desc A pointer to a I2S_BufDesc object. The bufPtr * and bufSize fields must be set to a buffer and the * size of the buffer before passing to this function. * @return Returns 0 if successful else would return * I2S_STATUS_UNDEFINEDCMD on an error. */extern int_fast16_t I2S_writeIssue(I2S_Handle handle, I2S_BufDesc *desc);

/*! * @brief Function to retrieve a buffer that the I2S has finished writing. * * @param handle A I2S_Handle * * @param pDesc A pointer to a I2S_BufDesc pointer. * * @return Returns the number of bytes that have been written to the I2S, * 0 on timeout. */extern size_t I2S_writeReclaim(I2S_Handle handle, I2S_BufDesc **pDesc);

这些读写驱动,

赞(0)
未经允许不得转载:TI中文支持网 » I2S使用
分享到: 更多 (0)