Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ static void memFree(void* const user_reference, const size_t size, void* const p
Init a library instance:

```c
const struct CanardMemoryResource memory{nullptr, &memAllocate, &memFree};
const struct CanardMemoryResource memory = {NULL, memFree, memAllocate};
struct CanardInstance canard = canardInit(memory);
canard.node_id = 42; // Defaults to anonymous; can be set up later at any point.
```

In order to be able to send transfers over the network, we will need one transmission queue per redundant CAN interface:

```c
const struct CanardMemoryResource tx_memory{nullptr, memAllocate, memFree};
const struct CanardMemoryResource tx_memory = {NULL, memFree, memAllocate};
struct CanardTxQueue queue = canardTxInit(
100, // Limit the size of the queue at 100 frames.
CANARD_MTU_CAN_FD, // Set MTU = 64 bytes. There is also CANARD_MTU_CAN_CLASSIC.
Expand Down