Skip to content

Commit 7281900

Browse files
authored
fix static analysis (#393)
* fix static analysis * update to analyze all branches * fix led_strip example build * remove goto from example * remove recursive clone from sa and all the additional ignores it requres * add pull request trigger as well * disable pull request target for now -.- * revert * fix examples
1 parent e220938 commit 7281900

File tree

34 files changed

+62
-45
lines changed

34 files changed

+62
-45
lines changed

.github/workflows/static_analysis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ jobs:
1414
steps:
1515
- name: Checkout repo
1616
uses: actions/checkout@v4
17-
with:
18-
submodules: 'recursive'
1917

2018
- name: Run static analysis
2119
uses: esp-cpp/StaticAnalysis@master
2220
with:
21+
language: c++
22+
2323
# Do not build the project and do not use cmake to generate compile_commands.json
2424
use_cmake: false
2525

2626
# Use the 5.4 release version since it's what we build with
2727
esp_idf_version: release/v5.4
2828

2929
# (Optional) cppcheck args
30-
cppcheck_args: -i$GITHUB_WORKSPACE/lib -i$GITHUB_WORKSPACE/external -i$GITHUB_WORKSPACE/components/binary-log/detail -i$GITHUB_WORKSPACE/components/esp_littlefs -i$GITHUB_WORKSPACE/components/esp-nimble-cpp -i$GITHUB_WORKSPACE/components/hid-rp/include/hid -i$GITHUB_WORKSPACE/components/lvgl -i$GITHUB_WORKSPACE/components/esp-dsp --force --enable=all --inline-suppr --inconclusive --platform=mips32 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt
30+
cppcheck_args: -i$GITHUB_WORKSPACE/lib -i$GITHUB_WORKSPACE/components/state_machine/example/main -i$GITHUB_WORKSPACE/components/hid-rp/include/hid --check-level=exhaustive --force --enable=all --inline-suppr --inconclusive --platform=mips32 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt

components/adc/include/continuous_adc.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class ContinuousAdc : public espp::BaseComponent {
170170
return static_cast<int>(unit) * 32 + static_cast<int>(channel);
171171
}
172172

173-
bool update_task(std::mutex &task_m, std::condition_variable &task_cv, bool &task_notified) {
173+
bool update_task(std::mutex &, std::condition_variable &, bool &) {
174174
task_handle_ = xTaskGetCurrentTaskHandle();
175175
static auto previous_timestamp = std::chrono::high_resolution_clock::now();
176176
// wait until conversion is ready (will be notified by the registered

components/adc/include/oneshot_adc.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class OneshotAdc : public BaseComponent {
150150
memset(&init_config, 0, sizeof(init_config));
151151
init_config.unit_id = config.unit;
152152
ESP_ERROR_CHECK(adc_oneshot_new_unit(&init_config, &adc_handle_));
153-
for (auto &conf : config.channels) {
153+
for (const auto &conf : config.channels) {
154154
auto channel = conf.channel;
155155
auto attenuation = conf.attenuation;
156156
auto channel_unit = conf.unit;

components/ads7138/example/main/ads7138_example.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ extern "C" void app_main(void) {
125125

126126
// start the gpio task
127127
auto alert_task = espp::Task::make_unique({
128-
.callback = [&ads](auto &m, auto &cv) -> bool {
128+
.callback = [&ads](auto &, auto &) -> bool {
129129
static uint32_t io_num;
130130
// block until we get a message from the interrupt handler
131131
if (xQueueReceive(gpio_evt_queue, &io_num, portMAX_DELAY)) {

components/ble_gatt_server/example/main/ble_gatt_server_example.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ extern "C" void app_main(void) {
2424
std::string device_name = "Espp BLE GATT Server";
2525
ble_gatt_server.set_log_level(espp::Logger::Verbosity::INFO);
2626
ble_gatt_server.set_callbacks({
27-
.connect_callback = [&](NimBLEConnInfo &conn_info) { logger.info("Device connected"); },
28-
.disconnect_callback = [&](auto &conn_info,
27+
.connect_callback =
28+
[&](const NimBLEConnInfo &conn_info) { logger.info("Device connected"); },
29+
.disconnect_callback = [&](const auto &conn_info,
2930
auto reason) { logger.info("Device disconnected: {}", reason); },
3031
.authentication_complete_callback =
3132
[&](const NimBLEConnInfo &conn_info) { logger.info("Device authenticated"); },

components/bm8563/example/main/bm8563_example.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ using namespace std::chrono_literals;
1010

1111
extern "C" void app_main(void) {
1212
{
13-
std::atomic<bool> quit_test = false;
1413
fmt::print("Starting tt2100 example\n");
1514
//! [bm8563 example]
1615
// make the I2C that we'll use to communicate

components/button/example/main/button_example.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ extern "C" void app_main(void) {
3131
//! [button example]
3232
static auto start = std::chrono::high_resolution_clock::now();
3333
std::string button_topic = "button/state";
34-
std::string button_component_name = "button";
3534

3635
// create a button
3736
espp::Button button({

components/chsc6x/example/main/chsc6x_example.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ using namespace std::chrono_literals;
1010

1111
extern "C" void app_main(void) {
1212
{
13-
std::atomic<bool> quit_test = false;
1413
fmt::print("Starting chsc6x example\n");
1514
//! [chsc6x example]
1615
// make the I2C that we'll use to communicate

components/cli/include/line_input.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class LineInput {
8484
* @brief Get the input history.
8585
* @return The input that has been entered so far, as History.
8686
*/
87-
History get_history() const { return input_history_; }
87+
const History &get_history() const { return input_history_; }
8888

8989
/**
9090
* @brief Replace any existing input history with \p history.

components/cst816/example/main/cst816_example.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ using namespace std::chrono_literals;
1010

1111
extern "C" void app_main(void) {
1212
{
13-
std::atomic<bool> quit_test = false;
1413
fmt::print("Starting cst816 example\n");
1514
//! [cst816 example]
1615
// make the I2C that we'll use to communicate

components/display_drivers/example/main/display_drivers_example.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ static constexpr int DC_LEVEL_BIT = (1 << (int)espp::display_drivers::Flags::DC_
5656
// (DC_LEVEL_BIT).
5757
// Except for the T-Encoder Pro, which does not have a D/C line.
5858
#ifndef CONFIG_T_ENCODER_PRO
59+
// cppcheck-suppress constParameterCallback
5960
static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
6061
uint32_t user_flags = (uint32_t)(t->user);
6162
bool dc_level = user_flags & DC_LEVEL_BIT;
@@ -68,6 +69,8 @@ static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
6869
// This function is called (in irq context!) just after a transmission ends. It
6970
// will indicate to lvgl that the next flush is ready to be done if the
7071
// FLUSH_BIT is set.
72+
//
73+
// cppcheck-suppress constParameterCallback
7174
static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) {
7275
uint16_t user_flags = (uint32_t)(t->user);
7376
bool should_flush = user_flags & FLUSH_BIT;

components/esp-box/example/main/esp_box_example.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ static size_t load_audio() {
183183
}
184184

185185
// these are configured in the CMakeLists.txt file
186-
extern const char wav_start[] asm("_binary_click_wav_start");
187-
extern const char wav_end[] asm("_binary_click_wav_end");
186+
extern const char wav_start[] asm("_binary_click_wav_start"); // cppcheck-suppress syntaxError
187+
extern const char wav_end[] asm("_binary_click_wav_end"); // cppcheck-suppress syntaxError
188188

189189
// -1 due to the size being 1 byte too large, I think because end is the byte
190190
// immediately after the last byte in the memory but I'm not sure - cmm 2022-08-20

components/esp-box/src/video.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ static constexpr int DC_LEVEL_BIT = (1 << (int)espp::display_drivers::Flags::DC_
1515
// This function is called (in irq context!) just before a transmission starts.
1616
// It will set the D/C line to the value indicated in the user field
1717
// (DC_LEVEL_BIT).
18+
//
19+
// cppcheck-suppress constParameterCallback
1820
static void lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
1921
static auto lcd_dc_io = EspBox::get_lcd_dc_gpio();
2022
uint32_t user_flags = (uint32_t)(t->user);
@@ -25,6 +27,8 @@ static void lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
2527
// This function is called (in irq context!) just after a transmission ends. It
2628
// will indicate to lvgl that the next flush is ready to be done if the
2729
// FLUSH_BIT is set.
30+
//
31+
// cppcheck-suppress constParameterCallback
2832
static void lcd_spi_post_transfer_callback(spi_transaction_t *t) {
2933
uint16_t user_flags = (uint32_t)(t->user);
3034
bool should_flush = user_flags & FLUSH_BIT;

components/ft5x06/example/main/ft5x06_example.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ using namespace std::chrono_literals;
1010

1111
extern "C" void app_main(void) {
1212
{
13-
std::atomic<bool> quit_test = false;
1413
fmt::print("Starting ft5x06 example\n");
1514
//! [ft5x06 example]
1615
// make the I2C that we'll use to communicate

components/gfps_service/example/main/gfps_service_example.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ extern "C" void app_main(void) {
2121
std::string device_name = "ESP++ GFPS";
2222
ble_gatt_server.set_log_level(espp::Logger::Verbosity::INFO);
2323
ble_gatt_server.set_callbacks({
24-
.connect_callback = [&](NimBLEConnInfo &conn_info) { logger.info("Device connected"); },
25-
.disconnect_callback = [&](auto &conn_info,
24+
.connect_callback = [&](const NimBLEConnInfo &conn_info) { logger.info("Device connected"); },
25+
.disconnect_callback = [&](const auto &conn_info,
2626
auto reason) { logger.info("Device disconnected: {}", reason); },
2727
.authentication_complete_callback =
2828
[&](const NimBLEConnInfo &conn_info) { logger.info("Device authenticated"); },

components/gfps_service/src/nearby_audio.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ bool nearby_platform_AutoReconnected() {
6363
// For example, if there are 5 bonded devices, then |length| should be set to 1.
6464
// Call |nearby_platform_AudioCallbacks::on_state_change| when this state
6565
// changes.
66-
void nearby_platform_GetConnectionBitmap(uint8_t *bitmap, size_t *length) {
66+
void nearby_platform_GetConnectionBitmap(uint8_t *, size_t *) {
6767
// TODO: implement
6868
}
6969

components/gfps_service/src/nearby_battery.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
// Gets battery and charging info
44
//
55
// battery_info - Battery status structure.
6-
nearby_platform_status nearby_platform_GetBatteryInfo(nearby_platform_BatteryInfo *battery_info) {
6+
nearby_platform_status nearby_platform_GetBatteryInfo(nearby_platform_BatteryInfo *) {
77
// TODO: Implement
88
return kNearbyStatusOK;
99
}
1010

1111
// Initializes battery module
1212
//
1313
// battery_interface - Battery status callback events.
14-
nearby_platform_status
15-
nearby_platform_BatteryInit(nearby_platform_BatteryInterface *battery_interface) {
14+
nearby_platform_status nearby_platform_BatteryInit(nearby_platform_BatteryInterface *) {
1615
// TODO: Implement
1716
return kNearbyStatusOK;
1817
}

components/gt911/example/main/gt911_example.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ using namespace std::chrono_literals;
1010

1111
extern "C" void app_main(void) {
1212
{
13-
std::atomic<bool> quit_test = false;
1413
fmt::print("Starting gt911 example\n");
1514
//! [gt911 example]
1615
// make the I2C that we'll use to communicate

components/hid-rp/include/hid-rp-switch-pro.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class SwitchProGamepadInputReport : public hid::report::base<hid::report::type::
192192
// fill all 0s
193193
std::fill(raw_report, raw_report + sizeof(raw_report), 0);
194194
// now set the counter to the previous value
195-
counter = prev_counter;
195+
counter = prev_counter; // cppcheck-suppress redundantAssignment
196196
// set the joysticks to 0 since their config may not put them at 0
197197
set_left_joystick(0, 0);
198198
set_right_joystick(0, 0);

components/hid_service/example/main/hid_service_example.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ extern "C" void app_main(void) {
6969
std::string device_name = "ESP++ HID";
7070
ble_gatt_server.set_log_level(espp::Logger::Verbosity::INFO);
7171
ble_gatt_server.set_callbacks({
72-
.connect_callback = [&](NimBLEConnInfo &conn_info) { logger.info("Device connected"); },
73-
.disconnect_callback = [&](auto &conn_info,
72+
.connect_callback = [&](const NimBLEConnInfo &conn_info) { logger.info("Device connected"); },
73+
.disconnect_callback = [&](const auto &conn_info,
7474
auto reason) { logger.info("Device disconnected: {}", reason); },
7575
.authentication_complete_callback =
7676
[&](const NimBLEConnInfo &conn_info) { logger.info("Device authenticated"); },

components/interrupt/include/interrupt.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ class Interrupt : public BaseComponent {
407407
return level == static_cast<int>(active_level);
408408
}
409409

410-
bool task_callback(std::mutex &m, std::condition_variable &cv, bool &task_notified) {
410+
bool task_callback(std::mutex &, std::condition_variable &, bool &) {
411411
EventData event_data;
412412
// record the min number of free spaces in the queue
413413
size_t free_spaces = uxQueueSpacesAvailable(queue_);

components/led_strip/example/main/led_strip_example.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ extern "C" void app_main(void) {
8484
}
8585
if (session_state & RMT_ENCODING_MEM_FULL) {
8686
state |= RMT_ENCODING_MEM_FULL;
87-
goto out; // yield if there's no free space for encoding artifacts
87+
// skip the fallthrough to leave the switch and finish the
88+
// function
89+
break;
8890
}
89-
// fall-through
91+
// intentional fall-through
9092
case 1: // send reset code
9193
encoded_symbols += copy_encoder->encode(copy_encoder, channel, &led_reset_code,
9294
sizeof(led_reset_code), &session_state);
@@ -96,10 +98,11 @@ extern "C" void app_main(void) {
9698
}
9799
if (session_state & RMT_ENCODING_MEM_FULL) {
98100
state |= RMT_ENCODING_MEM_FULL;
99-
goto out; // yield if there's no free space for encoding artifacts
101+
// skip the fallthrough to leave the switch and finish the
102+
// function
103+
break;
100104
}
101105
}
102-
out:
103106
*ret_state = static_cast<rmt_encode_state_t>(state);
104107
return encoded_symbols;
105108
},

components/matouch-rotary-display/src/matouch-rotary-display.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ static constexpr int DC_LEVEL_BIT = (1 << (int)espp::display_drivers::Flags::DC_
212212
// This function is called (in irq context!) just before a transmission starts.
213213
// It will set the D/C line to the value indicated in the user field
214214
// (DC_LEVEL_BIT).
215+
//
216+
// cppcheck-suppress constParameterCallback
215217
static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
216218
static auto lcd_dc_io = MatouchRotaryDisplay::get_lcd_dc_gpio();
217219
uint32_t user_flags = (uint32_t)(t->user);
@@ -222,6 +224,8 @@ static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
222224
// This function is called (in irq context!) just after a transmission ends. It
223225
// will indicate to lvgl that the next flush is ready to be done if the
224226
// FLUSH_BIT is set.
227+
//
228+
// cppcheck-suppress constParameterCallback
225229
static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) {
226230
uint16_t user_flags = (uint32_t)(t->user);
227231
bool should_flush = user_flags & FLUSH_BIT;

components/max1704x/example/main/max1704x_example.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ extern "C" void app_main(void) {
2525
.read = std::bind(&espp::I2c::read, &i2c, std::placeholders::_1,
2626
std::placeholders::_2, std::placeholders::_3),
2727
.log_level = espp::Logger::Verbosity::WARN});
28-
std::error_code ec;
2928

3029
// and finally, make the task to periodically poll the max1704x and print
3130
// the state. NOTE: the Max1704x does not internally manage its own state

components/rmt/example/main/rmt_example.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ extern "C" void app_main(void) {
7373
}
7474
if (session_state & RMT_ENCODING_MEM_FULL) {
7575
state |= RMT_ENCODING_MEM_FULL;
76-
goto out; // yield if there's no free space for encoding artifacts
76+
break; // yield if there's no free space for encoding artifacts
7777
}
78-
// fall-through
78+
// intentional fall-through
7979
case 1: // send reset code
8080
encoded_symbols += copy_encoder->encode(copy_encoder, channel, &led_reset_code,
8181
sizeof(led_reset_code), &session_state);
@@ -85,10 +85,9 @@ extern "C" void app_main(void) {
8585
}
8686
if (session_state & RMT_ENCODING_MEM_FULL) {
8787
state |= RMT_ENCODING_MEM_FULL;
88-
goto out; // yield if there's no free space for encoding artifacts
88+
break; // yield if there's no free space for encoding artifacts
8989
}
9090
}
91-
out:
9291
*ret_state = static_cast<rmt_encode_state_t>(state);
9392
return encoded_symbols;
9493
},

components/seeed-studio-round-display/example/main/seeed_studio_round_display_example.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ static void on_rotate_pressed(lv_event_t *event) {
149149
lv_disp_set_rotation(disp, rotation);
150150
}
151151

152+
// cppcheck-suppress constParameterCallback
152153
static void on_clear_pressed(lv_event_t *event) { clear_circles(); }
153154

154155
static void draw_circle(int x0, int y0, int radius) {

components/seeed-studio-round-display/src/seeed-studio-round-display.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ static constexpr int DC_LEVEL_BIT = (1 << (int)espp::display_drivers::Flags::DC_
172172
// This function is called (in irq context!) just before a transmission starts.
173173
// It will set the D/C line to the value indicated in the user field
174174
// (DC_LEVEL_BIT).
175+
//
176+
// cppcheck-suppress constParameterCallback
175177
static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
176178
static auto lcd_dc_io = SsRoundDisplay::get_lcd_dc_gpio();
177179
uint32_t user_flags = (uint32_t)(t->user);
@@ -182,6 +184,8 @@ static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
182184
// This function is called (in irq context!) just after a transmission ends. It
183185
// will indicate to lvgl that the next flush is ready to be done if the
184186
// FLUSH_BIT is set.
187+
//
188+
// cppcheck-suppress constParameterCallback
185189
static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) {
186190
uint16_t user_flags = (uint32_t)(t->user);
187191
bool should_flush = user_flags & FLUSH_BIT;

components/state_machine/example/main/hfsm_example.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ extern "C" void app_main(void) {
2525
{
2626
fmt::print("Starting hfsm example!\n");
2727
//! [hfsm example]
28-
const espp::state_machine::Complex::GeneratedEventBase *e = nullptr;
29-
bool handled = false;
30-
3128
// create the HFSM
3229
espp::state_machine::Complex::Root complex_root;
3330

@@ -88,8 +85,6 @@ extern "C" void app_main(void) {
8885
// get_user_selection() function.
8986
espp::Cli::configure_stdin_stdout();
9087

91-
const espp::state_machine::Complex::GeneratedEventBase *e = nullptr;
92-
9388
// create the HFSM
9489
espp::state_machine::Complex::Root complex_root;
9590

components/t-deck/src/t-deck.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ static constexpr int DC_LEVEL_BIT = (1 << (int)espp::display_drivers::Flags::DC_
242242
// This function is called (in irq context!) just before a transmission starts.
243243
// It will set the D/C line to the value indicated in the user field
244244
// (DC_LEVEL_BIT).
245+
//
246+
// cppcheck-suppress constParameterCallback
245247
static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
246248
static auto lcd_dc_io = TDeck::get_lcd_dc_gpio();
247249
uint32_t user_flags = (uint32_t)(t->user);
@@ -252,6 +254,8 @@ static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
252254
// This function is called (in irq context!) just after a transmission ends. It
253255
// will indicate to lvgl that the next flush is ready to be done if the
254256
// FLUSH_BIT is set.
257+
//
258+
// cppcheck-suppress constParameterCallback
255259
static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) {
256260
uint16_t user_flags = (uint32_t)(t->user);
257261
bool should_flush = user_flags & FLUSH_BIT;

components/t-dongle-s3/src/t-dongle-s3.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ static constexpr int DC_LEVEL_BIT = (1 << (int)espp::display_drivers::Flags::DC_
125125
// This function is called (in irq context!) just before a transmission starts.
126126
// It will set the D/C line to the value indicated in the user field
127127
// (DC_LEVEL_BIT).
128+
//
129+
// cppcheck-suppress constParameterCallback
128130
static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
129131
static auto lcd_dc_io = TDongleS3::get_lcd_dc_gpio();
130132
uint32_t user_flags = (uint32_t)(t->user);
@@ -135,6 +137,8 @@ static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) {
135137
// This function is called (in irq context!) just after a transmission ends. It
136138
// will indicate to lvgl that the next flush is ready to be done if the
137139
// FLUSH_BIT is set.
140+
//
141+
// cppcheck-suppress constParameterCallback
138142
static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) {
139143
uint16_t user_flags = (uint32_t)(t->user);
140144
bool should_flush = user_flags & FLUSH_BIT;

0 commit comments

Comments
 (0)