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

A bunch of compile warning fixes and addition of keil project file #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trollcop
Copy link

@trollcop trollcop commented Jun 9, 2019

Hey, I'm gonna be using this project on a self-balancing platform that I'm making, so I figured I'll clean up a bunch of stuff after importing the project.

I didn't test building back with gcc, but all the changes were just done to remove build warnings with armcc and arm-llvm. So they should be fine on gcc/Makefile as well.

…32k evaluation version can be used (-O0 build is only 14kbytes code)

Changed all float constants to use f suffix to prevent double conversions
Removed compile warnings due to HAL_GPIO_* related calls
Added comms.h with prototypes for functions which were used in main()
Casts and externs to fix compile warnings in various files.
Made a bunch of file-local variables static.
Fixed buzzerFreq/buzzerPattern extern declarations with correct type (uint8_t)
Added static inline to blockPWM/blockPhaseCurrent to conform to C99, when a function cannot be inlined it must either provide a non-inline version or be marked as static
Since this is C, void func() { } needs to be void func(void) { }, so fixed that in all instances.
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.

None yet

1 participant