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

USBD dwc_otg register bits fixed for FIFO flush #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexrayne
Copy link

some USBD register fields was broken or miss.
also fifo flush routine now more strict prepares for flushing

+               CGINAK
!usbd:flush_fifo - now unsures core not access to fifo before flush - according to stm32f4 RM0090 notes.
@@ -0,0 +1,1692 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

this file is auto generated.
not to be included in git history

Copy link
Author

Choose a reason for hiding this comment

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

it was intruded by mistake from my branch

@@ -99,7 +99,7 @@ bit AHBIDL 31
bits
name TXFNUM
size 5
offset 16
offset 6
Copy link
Contributor

@kuldeepdhaka kuldeepdhaka Mar 9, 2017

Choose a reason for hiding this comment

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

👍

@@ -495,7 +495,8 @@ reg DCTL 0x804
bit POPRGDNE 11
bit CGONAK 10
bit SGONAK 9
bit SGINAK 8
bit CGINAK 8
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -109,12 +109,25 @@ static inline uint16_t get_fifo_depth(usbd_device *dev)
*/
static void flush_fifo(usbd_device *dev)
{
// Set Global IN OUT ep NACK
Copy link
Contributor

Choose a reason for hiding this comment

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

C code. "//" is c++ comment style.

Copy link
Member

Choose a reason for hiding this comment

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

i also would like to point out https://github.com/insane-adding-machines/unicore-mx/blob/master/HACKING
it is a useful resource for stuff like coding style we accept.


const uint32_t GNACKEFF = DWC_OTG_GINTMSK_GINAKEFFM ; // | DWC_OTG_GINTMSK_GONAKEFFM ;
// Wait Global NACK Effective
while ( (REBASE(DWC_OTG_GINTSTS) & GNACKEFF) != GNACKEFF );
Copy link
Contributor

@kuldeepdhaka kuldeepdhaka Mar 9, 2017

Choose a reason for hiding this comment

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

while ((REBASE(DWC_OTG_GINTSTS) & GNACKEFF) != GNACKEFF); extra space.
codebase i see dont have any such space after bracket open or close. we can just stick to it.

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.

3 participants