Commit Graph

140 Commits

Author SHA1 Message Date
Ben Avison
73f22e31c7 [rp2040] Wrap GCC pragmas in #ifdef __GNUC__
IAR generates warning Pe161 'unrecognized #pragma'.
2022-09-13 18:00:51 +01:00
Ben Avison
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
Ben Avison
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
Ben Avison
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
Ben Avison
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
graham sanderson
fc1a27b6c9 RP@040: rework CMake for compiler warnings 2022-07-12 12:58:30 -05:00
hathach
9ec92ff97b rp2040 enable SOF as resumed signal when remote wakeup 2022-06-30 15:45:04 +07:00
hathach
25580b4fe9 use forloop to avoid -Warray-bounds with host setup packet 2022-06-27 21:05:41 +07:00
hathach
a0ef489890 fix all warnings with host rp2040 2022-06-27 17:11:24 +07:00
Ha Thach
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
Ha Thach
b4e62d1cda Merge pull request #1518 from mingpepe/master
Fix typo for log format
2022-06-18 12:39:16 +07:00
graham sanderson
c45118dacf rp2040: use shared IRQ handlers, so user can also hook the USB IRQ 2022-06-17 09:13:40 -05:00
mingpepe
1001d2da40 Fix typo for log format 2022-06-17 16:50:24 +08:00
graham sanderson
c5ba4af25b rp2040: make moving 1K of code into RAM optional - and off by default 2022-06-16 11:04:48 -05:00
Liam Fraser
19d054f789 hcd_rp2040 improvements:
- Stall now has priority over other interrupt responses
 - Delete eunused hcd_edpt_busy
 - Assert !ep->active when trying to start a new xfer
 - Assert !ep->active when handling buff_status bits
 - Set ep->xferred_len to 8 once a setup packet is finished so the data
structure is accurate
2022-06-13 16:19:11 +01:00
hathach
dd035b0eb2 make all hcd/dcd function used in isr into ram with __no_inline_not_in_flash_func() for faster irq handling
result is 1KB of code moved from rom -> ram
2022-06-08 16:08:53 +07:00
hathach
8cbc34de11 add tuh_configure() for port/dynamic host behavior config 2022-06-08 01:17:01 +07:00
Ha Thach
fdeac8508b Merge pull request #1381 from hathach/add-sof-isr
Add SOF IRQ Handler
2022-05-31 22:25:14 +07:00
graham sanderson
26c4d4b328 Minor cleanup of RP2040 code post addition of Pico-PIO_USB
* Removed some compiler warnings, and cleaned out unnecessary warning suppression from CMake suppress_tinyusb_warnings()
* Made explicit family_configure_dual_usb_example() for DUAL mode examples as family_configure_target() may not generally be called multiple times for the same target

* Renamed library pico_pio_usb to tinyusb_picio_pio_usb to be clearer and avoid conflict if someone already has a pico_pio_usb in their project
* Added family_add_pico_pio_usb() method for adding Pico-PIO_SUB support to an existing example
* Allowed tinyusb_pico_pio_usb to be added to regular apps using the Pico SDK
2022-05-20 17:25:30 -05:00
hathach
8473ca16fb clean up 2022-05-10 22:56:06 +07:00
hathach
85dcb73774 more clean up 2022-04-28 18:00:30 +07:00
hathach
ae5490e5a5 clean up 2022-04-27 20:52:56 +07:00
hathach
455bddddcd minor clean up 2022-04-26 18:47:09 +07:00
hathach
4d11c658ff improve pio usb endpoint handler 2022-04-26 13:08:03 +07:00
hathach
26a25279bc follow pio usb changes 2022-04-26 00:35:16 +07:00
hathach
2f9b9a31be more with pio usb 2022-04-22 18:26:58 +07:00
hathach
12debd7763 keep up with pio usb 2022-04-22 01:06:17 +07:00
hathach
a32cb1bb93 clean up pio driver 2022-04-18 17:49:21 +07:00
hathach
b5a9537eea support pio dcd endpiont stall 2022-04-16 01:19:51 +07:00
hathach
05bfc1a9eb pio device works well 2022-04-15 01:04:12 +07:00
hathach
cc5a4720e5 catch up with pio lib 2022-04-14 22:00:47 +07:00
hathach
d5d4909c20 proof of concpet that device pio-usb work with host pio-usb 2022-04-08 13:36:05 +07:00
hathach
d97c154695 add need_pre for pio usb, but not work out well 2022-04-05 00:04:47 +07:00
hathach
d7d7e61f34 correct pio usb speed, and close device 2022-04-03 22:48:08 +07:00
hathach
7ea75d3c09 use pio usb host init 2022-04-03 20:44:16 +07:00
hathach
f6851cf187 clean up hcd pio 2022-04-03 00:17:58 +07:00
hathach
f881e77e66 extracting hw root port 2022-04-02 19:19:00 +07:00
hathach
c25f835aea update to use pio hw endpoint 2022-04-01 23:31:43 +07:00
hathach
db6cba6a7b rename pio to pio_usb 2022-04-01 16:38:41 +07:00
hathach
e6e3dfedc8 hid example work well 2022-04-01 16:34:36 +07:00
hathach
75bca96bc6 pio usb control work well including stall response 2022-04-01 16:01:24 +07:00
hathach
e94d11a5b3 implement pio_usb_irq_handler 2022-03-31 12:56:53 +07:00
hathach
e2f0aef93b make use pio_usb_port_reset_start/end 2022-03-30 16:41:55 +07:00
hathach
45052c625e Merge branch 'master' into pio-host 2022-03-20 00:51:00 +07:00
hathach
85dbcf5473 implement dcd_sof_enable() for rp2040 2022-03-07 23:04:47 +07:00
hathach
96165a1950 rename HCD_MAX_XFER to CFG_TUH_ENDPOINT_MAX
minor clean up
2022-03-04 17:07:04 +07:00
Scott Shawcroft
2cd73ca602 Add host string descriptor functions
Plus typo fixes, GCC11 array bounds fix, snprintf for malloc-free
debug and pragmas for alignment checks.
2022-03-03 21:53:12 -08:00
hathach
fa62d5abc9 got interrupt endpoint working 2022-03-03 21:57:29 +07:00
hathach
635fb9dcdd try to fix ci 2022-03-02 12:33:47 +07:00
hathach
918f3e9cae minor rename 2022-03-02 12:22:20 +07:00