Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fifo get function to CDC class for DMA transfer #918

Closed
wants to merge 2 commits into from

Conversation

HiFiPhile
Copy link
Collaborator

Describe the PR
Like audio class, CDC need DMA support in order to support high speed transfer.

Additional context
If applicable, add any other context about the PR and/or screenshots here.

@HiFiPhile
Copy link
Collaborator Author

HiFiPhile commented Jun 24, 2021

It's not enough to just export the fifo, need a mechanism to call _prep_out_transaction. Maybe

void tud_cdc_n_rx_ff_read_done (uint8_t itf)
{
  cdcd_interface_t* p_cdc = &_cdcd_itf[itf];
  _prep_out_transaction(p_cdc);
}

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think exposing fifos is good idea. I don't have a specific suggestion for now, but we will need to spend more time to look at this later on.

@HiFiPhile
Copy link
Collaborator Author

In fact CDC streaming is needed by my company's project which restarted recently, following my tests last year.

For the short time expose the fifo fit my need, of cause we can make something better for example expose only fifo_info even add edpt_xfer_fifo support.

@hathach
Copy link
Owner

hathach commented Jun 24, 2021

In fact CDC streaming is needed by my company's project which restarted recently, following my tests last year.

For the short time expose the fifo fit my need, of cause we can make something better for example expose only fifo_info even add edpt_xfer_fifo support.

It is easy to expose an API, but it is very hard to drop one. I would prefer to figure it all out first. I think for now, you could make an "hack" for your fork e.g dropping static in the function/variable in the cdc_device and have extern in your app. It is not ideal, but I would be more flexible

@HiFiPhile
Copy link
Collaborator Author

I've opened a new issue to discuss #920 .

@HiFiPhile HiFiPhile closed this Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants