diff options
| author | hathach <[email protected]> | 2021-05-26 17:32:49 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-05-26 17:32:49 +0700 |
| commit | dbef50f8ffb6892297456aeb409f3d52d3731f0a (patch) | |
| tree | ccdc55b79f09fac955fcca7bb93b2ff74511d299 /examples | |
| parent | ce59d69520166b37869cf83a3dab929c1b2c4ac4 (diff) | |
| parent | 220f4410485a84a4e5e8f2a68e03dd8ed3b93900 (diff) | |
Merge branch 'master' into xmos-jmccarthy-master
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/uac2_headset/src/main.c | 9 | ||||
| -rw-r--r-- | examples/make.mk | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/examples/device/uac2_headset/src/main.c b/examples/device/uac2_headset/src/main.c index 57abafe6c..1b6a770a3 100644 --- a/examples/device/uac2_headset/src/main.c +++ b/examples/device/uac2_headset/src/main.c @@ -332,13 +332,14 @@ bool tud_audio_set_itf_cb(uint8_t rhport, tusb_control_request_t const * p_reque return true; } -bool tud_audio_rx_done_cb(uint8_t rhport, uint8_t *buffer, uint16_t buf_size) +bool tud_audio_rx_done_pre_read_cb(uint8_t rhport, uint16_t n_bytes_received, uint8_t func_id, uint8_t ep_out, uint8_t cur_alt_setting) { (void)rhport; + (void)func_id; + (void)ep_out; + (void)cur_alt_setting; - spk_data_size = buf_size; - memcpy(spk_buf, buffer, buf_size); - + spk_data_size = tud_audio_read(spk_buf, n_bytes_received); return true; } diff --git a/examples/make.mk b/examples/make.mk index 6366d6cef..df8bfd617 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -88,6 +88,7 @@ CFLAGS += \ -fno-strict-aliasing \ -Wdouble-promotion \ -Wstrict-prototypes \ + -Wstrict-overflow \ -Wall \ -Wextra \ -Werror \ @@ -100,7 +101,8 @@ CFLAGS += \ -Wsign-compare \ -Wmissing-format-attribute \ -Wunreachable-code \ - -Wcast-align + -Wcast-align \ + -Wcast-function-type # Debugging/Optimization ifeq ($(DEBUG), 1) |
