Skip to content

Commit 2c7f874

Browse files
committed
doc: guide: document types file
1 parent e0d40f0 commit 2c7f874

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

doc/guide.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,12 @@ All common system call operations should have asynchronous versions.
188188

189189
These asynchronous APIs must not use or include any internal/global state.
190190

191-
| Characteristic | Value |
192-
|------------------|-------------------------------|
193-
| Location | `libtock/[category]` |
194-
| Source File Name | `libtock/[category]/[name].c` |
195-
| Header File Name | `libtock/[category]/[name].h` |
191+
| Characteristic | Value |
192+
|-----------------------------------|-------------------------------------|
193+
| Location | `libtock/[category]` |
194+
| Source File Name | `libtock/[category]/[name].c` |
195+
| Header File Name | `libtock/[category]/[name].h` |
196+
| Types Header File Name (Optional) | `libtock/[category]/[name]_types.h` |
196197

197198
### Header Files
198199

@@ -275,6 +276,13 @@ returncode_t libtock_sensor_read(libtock_sensor_callback_reading cb) {
275276
}
276277
```
277278
279+
### Types Header
280+
281+
If there are any additional types, beyond the callback signature, that are
282+
exposed in the public API of the driver they must be included in the
283+
`libtock/[category]/[name]_types.h` file. This makes it possible to include
284+
these types from `libtock-sync` implementations.
285+
278286
## Synchronous APIs
279287
280288
Most system call interfaces will want to provide a synchronous API as well. This

0 commit comments

Comments
 (0)