Creating my own library of functions?

Status
Not open for further replies.

StuntMonkeh

Newbie level 2
Joined
Dec 12, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,297
I have just started out programming and I have an STM32VL board.

There are a number of functions I have written in the main.c that I want to put in my own library. How do I go about doing that?

All I can figure out is that I need a '.h' and '.c' file for the library.

Can someone point me in the right direction. Thanks.
 

Also make sure your functions are reusable and testable.
So put some effort on the comments (self documentation) and include some test functions and lot of error handling and wrapping.
it is quite basic, but that's how I did it.

Besides that, I suggest you check some existing frameworks to understand how the mainstream programmers logic, formatting and library building goes, it helps you build a maintainable programs and also better chance for jobs where you debug other's codes.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…