Skip to content
Open
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
7 changes: 4 additions & 3 deletions CANopenNode_STM32/CO_app_STM32.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "CANopen.h"
#include "main.h"
#include <stdio.h>
#include <inttypes.h>

#include "CO_storageBlank.h"
#include "OD.h"
Expand Down Expand Up @@ -90,7 +91,7 @@ canopen_app_init(CANopenNodeSTM32* _canopenNodeSTM32) {
log_printf("Error: Can't allocate memory\n");
return 1;
} else {
log_printf("Allocated %u bytes for CANopen objects\n", heapMemoryUsed);
log_printf("Allocated %" PRIu32 " bytes for CANopen objects\n", heapMemoryUsed);
}

canopenNodeSTM32->canOpenStack = CO;
Expand Down Expand Up @@ -155,7 +156,7 @@ canopen_app_resetCommunication() {
canopenNodeSTM32->activeNodeID, &errInfo);
if (err != CO_ERROR_NO && err != CO_ERROR_NODE_ID_UNCONFIGURED_LSS) {
if (err == CO_ERROR_OD_PARAMETERS) {
log_printf("Error: Object Dictionary entry 0x%X\n", errInfo);
log_printf("Error: Object Dictionary entry 0x%" PRIx32 "\n", errInfo);
} else {
log_printf("Error: CANopen initialization failed: %d\n", err);
}
Expand All @@ -165,7 +166,7 @@ canopen_app_resetCommunication() {
err = CO_CANopenInitPDO(CO, CO->em, OD, canopenNodeSTM32->activeNodeID, &errInfo);
if (err != CO_ERROR_NO && err != CO_ERROR_NODE_ID_UNCONFIGURED_LSS) {
if (err == CO_ERROR_OD_PARAMETERS) {
log_printf("Error: Object Dictionary entry 0x%X\n", errInfo);
log_printf("Error: Object Dictionary entry 0x%" PRIx32 "\n", errInfo);
} else {
log_printf("Error: PDO initialization failed: %d\n", err);
}
Expand Down