Skip to content

Commit cd195ec

Browse files
authored
Fix errors in the readme document (#249)
Since v4 has major changes, the readme document needs to be updated synchronously.
1 parent 4d46208 commit cd195ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ static void memFree(void* const user_reference, const size_t size, void* const p
8787
Init a library instance:
8888
8989
```c
90-
const struct CanardMemoryResource memory{nullptr, &memAllocate, &memFree};
90+
const struct CanardMemoryResource memory = {NULL, memFree, memAllocate};
9191
struct CanardInstance canard = canardInit(memory);
9292
canard.node_id = 42; // Defaults to anonymous; can be set up later at any point.
9393
```
9494

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

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

0 commit comments

Comments
 (0)