diff options
| author | hathach <[email protected]> | 2026-03-05 23:24:14 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-03-05 23:24:14 +0700 |
| commit | 61e4b9ce3fba2fea731396c56eee1c7b5a2f5338 (patch) | |
| tree | 8a9e326a544a34f7a0999a8c5b11bee4307314e2 /examples/device/uac2_speaker_fb/src | |
| parent | 97476872aa841fcd9cd622e4082d6c57b183c67f (diff) | |
add IAR warning flags to cmake build and fix them
Diffstat (limited to 'examples/device/uac2_speaker_fb/src')
| -rw-r--r-- | examples/device/uac2_speaker_fb/src/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/device/uac2_speaker_fb/src/main.c b/examples/device/uac2_speaker_fb/src/main.c index 8323d82e8..c3e97bb28 100644 --- a/examples/device/uac2_speaker_fb/src/main.c +++ b/examples/device/uac2_speaker_fb/src/main.c @@ -534,8 +534,9 @@ bool tud_audio_set_itf_close_ep_cb(uint8_t rhport, tusb_control_request_t const uint8_t const itf = tu_u16_low(tu_le16toh(p_request->wIndex)); uint8_t const alt = tu_u16_low(tu_le16toh(p_request->wValue)); - if (ITF_NUM_AUDIO_STREAMING == itf && alt == 0) + if (ITF_NUM_AUDIO_STREAMING == itf && alt == 0) { blink_interval_ms = BLINK_MOUNTED; + } return true; } @@ -569,7 +570,8 @@ bool tud_audio_rx_done_isr(uint8_t rhport, uint16_t n_bytes_received, uint8_t fu fifo_count = tud_audio_available(); // Same averaging method used in UAC2 class - fifo_count_avg = (uint32_t) (((uint64_t) fifo_count_avg * 63 + ((uint32_t) fifo_count << 16)) >> 6); + const uint32_t ff_count32 = (uint32_t) fifo_count << 16; + fifo_count_avg = (uint32_t) (((uint64_t) fifo_count_avg * 63 + ff_count32) >> 6); return true; } |
