HOw to make C header files?

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

So i wrote my own LCd code. What i want to do, is put it all into a header file (LCD.h), and then be able to call it from another file, so that i can use the functions in LCD.h...

i'm clueless on how to do this..

any suggestions?

does anyonehavea resource that shows me how to?

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The best resource is other header files.

If you are using WinAVR C or other language package you have a bunch ready to go and to use as a pattern to follow.

Once you get the hang of writing your own, you'll never be stuck when a new device comes out you want to use. Just sit down with the datasheet and start building.

One thing though - you might not want to change existing header files as then you are stuck re-coding every time a new version comes out. I'd create your own library of header files with whatever definitions/functionality you are wanting.

If you mean actual code, that doesn't go in a header file. That would be for a library of C functions for example.

Please note - this post may not present all information available on a subject.