Friday, March 2, 2018

globals header for EFM8BB1 microcontroller


You often need to use functions or macros across multiple header files, so it is better to put them in a separate header file for better organization. I use a header file called 'globals' and I will be adding or improving things as I go.

At the moment the file includes some macros such as CPU frequency and some functions.


uint8_t stringToInt(uint8_t);
uint8_t toUpperCase(const char c);
bool isLowerCase(const char c);


The function names are self explanatory. They are commented inside the file if you want to use them. Also it is a good idea to comment out the ones that you don't use, to save space.

Download

Version 1.0
globals.h

No comments:

Post a Comment

AddToAny

Related Posts Plugin for WordPress, Blogger...