mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 03:16:37 +00:00
[esp32] Fix clang-tidy on ESP-IDF 6 (#16850)
This commit is contained in:
@@ -222,6 +222,7 @@ bool BTHomeMiThermometer::decrypt_bthome_payload_(const std::vector<uint8_t> &da
|
||||
}
|
||||
|
||||
size_t plaintext_length;
|
||||
// NOLINTNEXTLINE(readability-suspicious-call-argument) - similarly named size args are not swapped
|
||||
psa_status_t status = psa_aead_decrypt(key_id, PSA_ALG_AEAD_WITH_SHORTENED_TAG(PSA_ALG_CCM, BTHOME_MIC_SIZE),
|
||||
nonce.data(), nonce.size(), nullptr, 0, ct_with_tag, ct_with_tag_size,
|
||||
payload.data(), ciphertext_size, &plaintext_length);
|
||||
|
||||
@@ -165,6 +165,8 @@ void LEDCOutput::write_state(float state) {
|
||||
void LEDCOutput::setup() {
|
||||
if (!ledc_peripheral_reset_done) {
|
||||
ESP_LOGV(TAG, "Resetting LEDC peripheral to clear stale state after reboot");
|
||||
// Skip under clang-tidy: the inlined HAL MMIO writes trip clang-analyzer-core.FixedAddressDereference
|
||||
#if !defined(CLANG_TIDY)
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 1, 0)
|
||||
PERIPH_RCC_ATOMIC() { ledc_ll_reset_register(0); }
|
||||
#elif ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
@@ -174,6 +176,7 @@ void LEDCOutput::setup() {
|
||||
}
|
||||
#else
|
||||
periph_module_reset(PERIPH_LEDC_MODULE);
|
||||
#endif
|
||||
#endif
|
||||
ledc_peripheral_reset_done = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user