Skip to content

Commit

Permalink
docs: Add note to API.md on importing can2040.h from C++
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin O'Connor <[email protected]>
  • Loading branch information
KevinOConnor committed May 4, 2023
1 parent ad26a4f commit edca41e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,16 @@ That is, one must ensure each instance is not reentrant with respect
to itself, but it is not required to synchronize between instances.
One may run both can2040 instances on the same ARM core or different
ARM cores.
# Using can2040 from C++
The can2040 code is intended to be compiled with gcc. If can2040.c is
compiled with a C compiler and linked with a C++ application then be
careful to always import the `can2040.h` header file into C++ code in
"C" mode - for example:
```c
extern "C" {
#include "can2040.h"
}
```

0 comments on commit edca41e

Please sign in to comment.