From 188e3d69747594b89e6616ad8a6917af964751e7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Mar 2021 17:20:49 +1100 Subject: [PATCH] AP_Bootloader: save some flash space gets our largest F4 bootloaders under 16k again --- Tools/AP_Bootloader/support.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Tools/AP_Bootloader/support.cpp b/Tools/AP_Bootloader/support.cpp index da48ca6981..4ca9351b7b 100644 --- a/Tools/AP_Bootloader/support.cpp +++ b/Tools/AP_Bootloader/support.cpp @@ -35,32 +35,34 @@ static uint8_t last_uart; // #pragma GCC optimize("O0") -int16_t cin(unsigned timeout_ms) +static bool cin_data(uint8_t *data, uint8_t len, unsigned timeout_ms) { - uint8_t b = 0; for (uint8_t i=0; i