Commit Graph

2634 Commits

Author SHA1 Message Date
6a2d01bae4 Don't assume different enum types can be combined
IAR generates warning Pa089 'enumerated type mixed with another enumerated
type'.
2022-09-13 18:00:51 +01:00
53f0d5538b Don't assume ints automatically convert to enums
IAR generates warning Pe188 'enumerated type mixed with another type'.
2022-09-13 18:00:50 +01:00
65ba15c37d Remove unreachable code
IAR generates warning Pe111 'statement is unreachable'. In a couple of
cases, replace return statements with TU_ATTR_FALLTHROUGH; because some
compilers apparently can't figure out that the return statements are
unreachable but do whinge about an imagined fall-through without them!
2022-09-13 18:00:50 +01:00
16518dcbbb Refactor pointer arithmetic on void*
This is a GCC extension, illegal in ISO C. IAR generates errors Pa152
'these operand types cannot be used here' and Pe852 'expression must be a
pointer to a complete object type'.

Replace with uint8_t*.
2022-09-13 18:00:49 +01:00
6dfc857b91 [rp2040] Explicit cast value of hw_set_alias
Some compilers don't support the GNU extension `typeof` so their definitions
of `hw_set_alias` can't inherit their type from their argument, and the best
we can do is have `hw_set_alias` act the same as `hw_set_alias_untyped`.
This requires an explicit cast when the macro is used instead, otherwise
IAR generates error Pe132 'expression must have pointer-to-struct-or-union
type but it has type "void *"'.

The same goes for `hw_clear_alias`.
2022-09-12 18:46:09 +01:00
e5355d0335 [rp2040] Remove non-portable return statements
IAR generates error Pe118 'a void function may not return a value'.
2022-09-12 18:46:09 +01:00
5e3cfe7b57 nrf5x: Fix endpoint internal state when closed
Field started (regardind transfer) was only cleaed when transfer
was finished.
For audio devices set interface is called many times.
When there is no audio (silence) set interface requests zero
lenght bandwithd that in turn calls dcd_edpt_close().

When endpoint is closed due to set interface request transfer
should not longer be started since it will block next start transfer
with assert.

This just sets 'started' to false when endpoint is closed.
2022-08-26 08:10:15 +02:00
f6c1ce5b1c Merge pull request #1569 from hathach/release-0.14.0
increase version to 0.14.0 for release
2022-08-19 21:13:09 +07:00
792b2fb956 Merge pull request #1603 from Ryzee119/hub_improv
Host hub clear port and device interrupts
2022-08-17 15:03:48 +07:00
2b2354d302 Hub: Clear other port feature changes 2022-08-16 18:25:46 +09:30
3c7b5dcaff Hub: Handle hub device status change interrupt 2022-08-16 18:25:43 +09:30
585f37a797 Merge pull request #1489 from kasjer/kasjer/fix-nrf5x-dma-access
nrf5x: Fix DMA access
2022-08-15 21:30:39 +07:00
aafea8ef5d Hub: Rename port status callback to be more generic 2022-08-15 17:43:04 +09:30
5efef4393c Hub: Expand hub helpers to handle device events 2022-08-15 17:42:56 +09:30
c7469ce986 dfu: Allow DFU coexistence with other interfaces
dfu_moded_open() only works correct when its called on DFU interface
descriptor. It means that DFU is the only one interface in configuration
or driver is called after all others interface drivers were tried and
gave up.

If other interface is supported and but driver for DFU is called first
(this is the case for BTH and RNDIS).
Code after while loop (that was not entered) has an TU_ASSERT that will
make set_configuration to fail.

Now TU_VERIFY is called first to make sure open code is called for DFU
only and not other interface descriptors like in other drivers.
2022-08-09 10:42:30 +02:00
a219ba86ea fix issue with TUD_OPT_HIGH_SPEED 2022-08-01 14:52:29 +07:00
fd5bb6e5db Merge pull request #1514 from maddyaby/audiod_typo
Fix typo in audiod_rx_done_cb in audio_device.c
2022-07-19 17:10:45 +07:00
b0b155c949 increase version for release
along with minor doc update
2022-07-19 12:28:52 +07:00
ed2e587ace Merge pull request #1568 from hathach/revert-hid-callback-len-temporarily
temporarily revert len back to uint8_t in tud_hid_report_complete_cb() 0.14.0 release
2022-07-19 12:16:32 +07:00
2110e27678 Merge pull request #1531 from pigrew/usbtmc_highspeed
USBTMC: Fixes and support for high-speed USB
2022-07-18 22:20:43 +07:00
b495d6f8ec temporarily revert len back to uint8_t in tud_hid_report_complete_cb() for up coming release 2022-07-17 22:56:07 +07:00
7e4c0f64cd abtract attribute fallthrough 2022-07-14 18:39:47 +07:00
4bd47bcb99 disable bad gcc 6 warning 2022-07-12 13:29:47 -05:00
fc1a27b6c9 RP@040: rework CMake for compiler warnings 2022-07-12 12:58:30 -05:00
345558307d fix incorrect null-dereference warnings when compiling with gcc7 2022-07-12 00:50:52 +07:00
0bfb9d62de Merge pull request #1543 from robert-hh/1170_0.13.0
mimxrt: Change the definitions for MIMXRT boards.
2022-07-11 15:53:24 +07:00
19768936ae bump up mcux-sdk for rt11xx, add back OPT_MCU_MIMXRT11XX 2022-07-11 14:01:18 +07:00
54250d7dd5 USBTMC: explicit type conversions fix 2022-07-09 17:50:17 -04:00
ec6f56768a mimxrt: Change OPT_MCU_MIMXRT1xXX to OPT_MCU_MIMXRT.
Which fits both MIMXRT10XX and MIMXRT11XX.
2022-07-01 09:04:36 +02:00
60c1750a9b mimxrt: Add/change definitions for MIMXRT11XX boards.
These are mostly identical to the MIMXRT10XX, with one tiny difference.
2022-06-30 22:21:31 +02:00
9ec92ff97b rp2040 enable SOF as resumed signal when remote wakeup 2022-06-30 15:45:04 +07:00
19956f070d Merge pull request #1539 from hathach/improve-ci
Improve ci
2022-06-29 16:27:17 +07:00
8fe9022a6e fix buid_board.py script 2022-06-29 14:06:44 +07:00
b12863d27c Fix actual compiler warning on gcc 10.3.1 2022-06-29 07:28:35 +01:00
bc4da2047b samd: Fix a lock-up situation at high traffic.
This PR fixes a transmit lock-up, which happens, when data is received
and sent at the sime time at moderate to high speeds, like code
which just echoes incoming data.

In my case, an issue was reported here:
https://github.com/micropython/micropython/issues/8521
2022-06-27 20:31:44 +02:00
25580b4fe9 use forloop to avoid -Warray-bounds with host setup packet 2022-06-27 21:05:41 +07:00
9c56f70111 suppress error with net example 2022-06-27 20:30:47 +07:00
a0ef489890 fix all warnings with host rp2040 2022-06-27 17:11:24 +07:00
6522a8150e fix all device examples warnings 2022-06-27 13:48:47 +07:00
1a1f633922 Merge branch 'master' into add-more-warnings 2022-06-27 12:50:50 +07:00
556b5d5044 change report len in hid API from uint8_t to uint16_t
since HS interrupt endpoint can be up to 1024, 8-bit is not enough.
affected APIs are:
- tud_hid_n_report() / tud_hid_report()
- tud_hid_report_complete_cb()
2022-06-27 12:22:36 +07:00
0b3503cb33 clean up usbd log level 2022-06-27 11:56:48 +07:00
b9dc9dbd78 fix most warnings with rp2040 -wconversion 2022-06-27 11:50:17 +07:00
c675debfb2 USBTMC: Handle busy interrupt in. 2022-06-26 14:34:34 -04:00
239b5d5279 USBTMC: Manually stall and unstall EP when clear(ENDPOINT_HALT) is received. 2022-06-24 23:06:32 -04:00
0042eccb3b fix redundant-decls warnings by usbd/usbh 2022-06-24 22:52:11 +07:00
4f6e770eda add more warning option, also fix -Wconversion with rp2040
-Wuninitialized, -Wunused,  -Wredundant-decls
2022-06-24 19:46:19 +07:00
e9c29e6a2d Update USBTMC driver to support dynamic packet sizes (based on descriptor). 2022-06-21 21:27:52 -04:00
070382d599 Merge pull request #1509 from liamfraser/rp2040_hcd_improvements
RP2040 HCD Improvements (Hub + Keyboard + Mouse working)
2022-06-21 15:55:02 +07:00
ae8b8f0c93 Merge pull request #1515 from maddyaby/dcd_edpt_close
Stub out dcd_edpt_close for samd
2022-06-18 12:40:39 +07:00