Skip to content

Commit cfb90b0

Browse files
kapacuksalkinium
authored andcommitted
[examples] Update for UART buffer API change
1 parent 108cd13 commit cfb90b0

File tree

57 files changed

+52
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+52
-20
lines changed

examples/blue_pill_f103/adns_9800/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#undef MODM_LOG_LEVEL
2727
#define MODM_LOG_LEVEL modm::log::DEBUG
2828

29+
using Usart2 = BufferedUart<UsartHal2, UartTxBuffer<256>>;
2930
// Create an IODeviceWrapper around the Uart Peripheral we want to use
3031
modm::IODeviceWrapper< Usart2, modm::IOBuffer::BlockIfFull > loggerDevice;
3132

examples/blue_pill_f103/can/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <modm/board.hpp>
1313
#include <modm/debug/logger.hpp>
1414

15+
16+
using Usart2 = BufferedUart<UsartHal2, UartTxBuffer<256>>;
1517
modm::IODeviceWrapper< Usart2, modm::IOBuffer::BlockIfFull > loggerDevice;
1618
modm::log::Logger modm::log::info(loggerDevice);
1719

examples/blue_pill_f103/encoder_input/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#define MODM_LOG_LEVEL modm::log::INFO
2121

2222
// Create an IODeviceWrapper around the Uart Peripheral we want to use
23+
using Usart2 = BufferedUart<UsartHal2, UartTxBuffer<256>>;
2324
modm::IODeviceWrapper< Usart2, modm::IOBuffer::BlockIfFull > loggerDevice;
2425

2526
// Set all four logger streams to use the UART

examples/blue_pill_f103/encoder_input_bitbang/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#define MODM_LOG_LEVEL modm::log::INFO
2121

2222
// Create an IODeviceWrapper around the Uart Peripheral we want to use
23+
using Usart2 = BufferedUart<UsartHal2, UartTxBuffer<256>>;
2324
modm::IODeviceWrapper< Usart2, modm::IOBuffer::BlockIfFull > loggerDevice;
2425

2526
// Set all four logger streams to use the UART

examples/blue_pill_f103/environment/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Bme280Thread bme280Thread;
3131
#define MODM_LOG_LEVEL modm::log::DEBUG
3232

3333
// Create an IODeviceWrapper around the Uart Peripheral we want to use
34+
using Usart2 = BufferedUart<UsartHal2, UartTxBuffer<256>>;
3435
modm::IODeviceWrapper< Usart2, modm::IOBuffer::BlockIfFull > loggerDevice;
3536
modm::IOStream stream(loggerDevice);
3637

examples/blue_pill_f103/flash/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using namespace std::chrono_literals;
1616

17+
using Usart2 = BufferedUart<UsartHal2, UartTxBuffer<256>>;
1718
modm::IODeviceWrapper< Usart2, modm::IOBuffer::BlockIfFull > loggerDevice;
1819
modm::log::Logger modm::log::info(loggerDevice);
1920

examples/blue_pill_f103/logger/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#define MODM_LOG_LEVEL modm::log::INFO
2424

2525
// Create an IODeviceWrapper around the Uart Peripheral we want to use
26+
using Usart2 = BufferedUart<UsartHal2, UartTxBuffer<256>>;
2627
modm::IODeviceWrapper< Usart2, modm::IOBuffer::BlockIfFull > loggerDevice;
2728

2829
// Set all four logger streams to use the UART

examples/blue_pill_f103/weight_scale_hx711/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ using namespace Board;
2323
#define MODM_LOG_LEVEL modm::log::DEBUG
2424

2525
// Create an IODeviceWrapper around the Uart Peripheral we want to use
26+
using Usart1 = BufferedUart<UsartHal1, UartTxBuffer<256>>;
2627
modm::IODeviceWrapper< Usart1, modm::IOBuffer::BlockIfFull > loggerDevice;
2728

2829
// Set all four logger streams to use the UART

examples/generic/i2c_multiplex/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ using I2cMultiplexer = modm::I2cMultiplexer<MyI2cMaster, Mpx>;
2222
#ifndef MODM_BOARD_HAS_LOGGER
2323
#include <modm/debug.hpp>
2424
// Add logger manually
25+
using Usart2 = BufferedUart<UsartHal2, UartTxBuffer<2048>, UartRxBuffer<2048>>;
2526
using LoggerUsart = Usart2;
2627
using LoggerUsartTx = modm::platform::GpioA2;
2728
using LoggerUsartRx = modm::platform::GpioA3;

examples/generic/i2c_multiplex/project.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
<options>
55
<option name=":target">stm32f303k8t6</option>
66
<!-- <option name=":target">stm32f103c8t6</option> -->
7-
<option name=":platform:uart:2:buffer.tx">2Ki</option>
8-
<option name=":platform:uart:2:buffer.rx">2Ki</option>
97
<option name=":build:build.path">../../../build/generic/i2c_multiplex</option>
108
</options>
119
<modules>

0 commit comments

Comments
 (0)