lib/readme.txt

Tue, 11 Oct 2016 00:46:18 +0200

author
David Douard <david.douard@logilab.fr>
date
Tue, 11 Oct 2016 00:46:18 +0200
changeset 9
e5254c6aa0c8
parent 0
f3377957d8c0
permissions
-rw-r--r--

use only one USART

with a front "AND" gate to combine both serial lines

0
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
1
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
2 This directory is intended for the project specific (private) libraries.
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
3 PlatformIO will compile them to static libraries and link to executable file.
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
4
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
5 The source code of each library should be placed in separate directory, like
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
6 "lib/private_lib/[here are source files]".
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
7
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
8 For example, see how can be organized `Foo` and `Bar` libraries:
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
9
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
10 |--lib
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
11 | |--Bar
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
12 | | |--docs
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
13 | | |--examples
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
14 | | |--src
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
15 | | |- Bar.c
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
16 | | |- Bar.h
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
17 | |--Foo
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
18 | | |- Foo.c
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
19 | | |- Foo.h
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
20 | |- readme.txt --> THIS FILE
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
21 |- platformio.ini
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
22 |--src
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
23 |- main.c
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
24
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
25 Then in `src/main.c` you should use:
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
26
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
27 #include <Foo.h>
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
28 #include <Bar.h>
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
29
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
30 // rest H/C/CPP code
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
31
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
32 PlatformIO will find your libraries automatically, configure preprocessor's
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
33 include paths and build them.
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
34
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
35 See additional options for PlatformIO Library Dependency Finder `lib_*`:
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
36
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
37 http://docs.platformio.org/en/latest/projectconf.html#lib-install
f3377957d8c0 initial
David Douard <david.douard@logilab.fr>
parents:
diff changeset
38

mercurial