README 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. This directory is intended for project specific (private) libraries.
  2. PlatformIO will compile them to static libraries and link into the executable file.
  3. The source code of each library should be placed in a separate directory
  4. ("lib/your_library_name/[Code]").
  5. For example, see the structure of the following example libraries `Foo` and `Bar`:
  6. |--lib
  7. | |
  8. | |--Bar
  9. | | |--docs
  10. | | |--examples
  11. | | |--src
  12. | | |- Bar.c
  13. | | |- Bar.h
  14. | | |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
  15. | |
  16. | |--Foo
  17. | | |- Foo.c
  18. | | |- Foo.h
  19. | |
  20. | |- README --> THIS FILE
  21. |
  22. |- platformio.ini
  23. |--src
  24. |- main.c
  25. Example contents of `src/main.c` using Foo and Bar:
  26. ```
  27. #include <Foo.h>
  28. #include <Bar.h>
  29. int main (void)
  30. {
  31. ...
  32. }
  33. ```
  34. The PlatformIO Library Dependency Finder will find automatically dependent
  35. libraries by scanning project source files.
  36. More information about PlatformIO Library Dependency Finder
  37. - https://docs.platformio.org/page/librarymanager/ldf.html