Skip to content

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.

1 participant