diff --git a/src/lib/drivers/device/nuttx/I2C.cpp b/src/lib/drivers/device/nuttx/I2C.cpp index e3b163492b..353a0f8c65 100644 --- a/src/lib/drivers/device/nuttx/I2C.cpp +++ b/src/lib/drivers/device/nuttx/I2C.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2012-2020 PX4 Development Team. All rights reserved. + * Copyright (c) 2012-2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -114,7 +114,7 @@ I2C::init() if (_bus_clocks[bus_index] > _frequency) { (void)px4_i2cbus_uninitialize(_dev); _dev = nullptr; - DEVICE_LOG("FAIL: too slow for bus #%u: %u KHz, device max: %u KHz)", + DEVICE_LOG("FAIL: too slow for bus #%u: %u KHz, device max: %" PRIu32 " KHz)", get_device_bus(), _bus_clocks[bus_index] / 1000, _frequency / 1000); ret = -EINVAL; goto out; @@ -153,7 +153,7 @@ I2C::init() } // tell the world where we are - DEVICE_DEBUG("on I2C bus %d at 0x%02x (bus: %u KHz, max: %u KHz)", + DEVICE_DEBUG("on I2C bus %d at 0x%02x (bus: %u KHz, max: %" PRIu32 " KHz)", get_device_bus(), get_device_address(), _bus_clocks[bus_index] / 1000, _frequency / 1000); out: diff --git a/src/lib/drivers/device/nuttx/SPI.cpp b/src/lib/drivers/device/nuttx/SPI.cpp index 93a2d76f84..5621275f72 100644 --- a/src/lib/drivers/device/nuttx/SPI.cpp +++ b/src/lib/drivers/device/nuttx/SPI.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2012-2019 PX4 Development Team. All rights reserved. + * Copyright (C) 2012-2019, 2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -120,7 +120,8 @@ SPI::init() } /* tell the world where we are */ - DEVICE_DEBUG("on SPI bus %d at %d (%u KHz)", get_device_bus(), PX4_SPI_DEV_ID(_device), _frequency / 1000); + DEVICE_DEBUG("on SPI bus %d at %" PRId32 " (%" PRId32 " KHz)", get_device_bus(), PX4_SPI_DEV_ID(_device), + _frequency / 1000); return PX4_OK; }