Skip to content

Conversation

@makarenya
Copy link
Contributor

USB Device Middleware:
Ling endings changed to LF (it's common for all other parts of this repository)
And couple of files have been processed through clang-format and formatted by hands.

@fpistm
Copy link
Member

fpistm commented Feb 21, 2019

In fact, I avoid to change the code provided with the Cube FW package. This ease to track real diff btw version.
Moreover, if an update is perfromed all this code formatting will probably be lost.

About changing the file format to unified source is something I've made also.
Why you want update the code formatting?

Anyway, I guess you could save time using directly AStyle?

@makarenya
Copy link
Contributor Author

At this moment I'm working on this code, speeding up the USB. (and yes, i have to change this USB middleware and also pcd and ll_usb from HAL - it all contains a lot of errors). And these formatting bugs annoy me: double spaces, curved alignment, this code looks like, it was written in a hurry by the drunk man...

@fpistm
Copy link
Member

fpistm commented Feb 21, 2019

Don't know who has written this code, but agreed the code formatting is not "good".
So, try using astyle which will reformat it automatically using the astylerc.
Or I can do the job if you want.

@makarenya
Copy link
Contributor Author

makarenya commented Feb 21, 2019

I would be very happy if you create some styleset for the repository. So that anybody can automaticaly format the code before commit.

And I have a question: can we influence the original source libraries? I was not kidding about the errors in the HAL. For example, data is copied to PMA twice (the second copy is redundant) on the STM32F103 every time when it sent to the host.

@fpistm
Copy link
Member

fpistm commented Feb 21, 2019

Of course, each issue found in HAL or middleware are raised internally for correction.

@makarenya
Copy link
Contributor Author

Perfect

@fpistm
Copy link
Member

fpistm commented Feb 21, 2019

About style, i've already manage this:
https://github.com/stm32duino/Arduino_Core_STM32/tree/master/CI/astyle
Simply update astyle ignore to not ignore usb middleware

@fpistm
Copy link
Member

fpistm commented Feb 25, 2019

@makarenya is this one deprecated and replaced by #453?

@makarenya makarenya closed this Feb 25, 2019
@makarenya
Copy link
Contributor Author

yes

@makarenya makarenya deleted the style_correction branch March 8, 2019 18:21
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