File tree Expand file tree Collapse file tree 1 file changed +4
-25
lines changed
Expand file tree Collapse file tree 1 file changed +4
-25
lines changed Original file line number Diff line number Diff line change @@ -392,34 +392,13 @@ extern "C" {
392392
393393### Example:
394394
395- For our sensor example:
396-
397- Create a struct to be set by the asynchronous callback:
398-
399- ``` c
400- struct data {
401- bool fired;
402- int val;
403- returncode_t result;
404- };
405-
406- static struct data result = { .fired = false };
407- ```
408-
409- Define a static callback function to pass to the asynchronous implementation:
395+ For our sensor example, define the external function in the ` libtocksync_ ` name
396+ space for the sync operation:
410397
411398``` c
412- static void sensor_cb(returncode_t ret, int val) {
413- result.val = val;
414- result.fired = true;
415- result.result = ret;
416- }
417- ```
418-
419- Define the external function in the ` libtocksync_ ` name space for the sync
420- operation:
399+ #include " temperature.h"
400+ #include " syscalls/temperature_syscalls.h"
421401
422- ``` c
423402returncode_t libtocksync_sensor_read (int* val) {
424403 returncode_t err;
425404
You can’t perform that action at this time.
0 commit comments