高级会员

- 积分
- 921
- 金钱
- 921
- 注册时间
- 2016-4-20
- 在线时间
- 169 小时
|
发表于 2016-5-26 17:08:14
|
显示全部楼层
具体的修改细节我没有看的很仔细,因为我的项目接的不是codec芯片而是DSP。所以我这里有一个testbuf,里面是1KHz的正弦信号。
直接丢到这个buff里面就可以了吧
static uint8_t usbd_audio_DataIn (void *pdev, uint8_t epnum)
{
//if (epnum == AUDIO_IN_EP)
{
uint32_t i;
int16_t *buff = (int16_t *)IsocInBuff;
for (i = 0; i < AUDIO_IN_PACKET/2; i++)
{
buff = I2S_Buffer[i*4];
}
DCD_EP_Flush(pdev, AUDIO_IN_EP);//very important!!!
DCD_EP_Tx(pdev, AUDIO_IN_EP, IsocInBuff, AUDIO_IN_PACKET);
}
return USBD_OK;
}
|
|