Skip to content

Commit ca06286

Browse files
committed
[examples] Deduplicate USB examples
1 parent 124c414 commit ca06286

File tree

13 files changed

+13
-291
lines changed

13 files changed

+13
-291
lines changed

.github/workflows/linux.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,11 @@ jobs:
9292
- name: Examples SAMD Devices
9393
if: always()
9494
run: |
95-
(cd examples && ../tools/scripts/examples_compile.py feather_m4 samd samd21_xplained_pro)
95+
(cd examples && ../tools/scripts/examples_compile.py feather_m4 samd)
9696
- name: Examples SAMG Devices
9797
if: always()
9898
run: |
9999
(cd examples && ../tools/scripts/examples_compile.py samg55_xplained_pro)
100-
- name: Examples SAME5x Devices
101-
if: always()
102-
run: |
103-
(cd examples && ../tools/scripts/examples_compile.py same54_xplained_pro)
104100
- name: Examples SAME70 Devices
105101
if: always()
106102
run: |

examples/feather_m4/usbserial/main.cpp

Lines changed: 0 additions & 51 deletions
This file was deleted.

examples/feather_m4/usbserial/project.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/generic/usb/project.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@
1010
<!-- <extends>modm:disco-f746ng</extends> -->
1111
<!-- <extends>modm:disco-l476vg</extends> -->
1212
<!-- <extends>modm:feather-m0</extends> -->
13+
<!-- <extends>modm:feather-m4</extends> -->
1314
<!-- <extends>modm:nucleo-f429zi</extends> -->
1415
<!-- <extends>modm:nucleo-h723zg</extends> -->
1516
<!-- <extends>modm:nucleo-h743zi</extends> -->
1617
<!-- <extends>modm:rp-pico</extends> -->
1718
<!-- <extends>modm:samd21-mini</extends> -->
19+
<!-- <extends>modm:samd21-xplained-pro</extends> -->
20+
<!-- <extends>modm:same54-xplained-pro</extends> -->
21+
<!-- <extends>modm:samg55-xplained-pro</extends> -->
22+
<!-- <extends>modm:nucleo-f446ze</extends> -->
1823
<options>
1924
<option name="modm:build:build.path">../../../build/generic/usb</option>
2025
<option name="modm:build:openocd.cfg">openocd.cfg</option>
@@ -34,6 +39,7 @@
3439
<module>modm:io</module>
3540
</modules>
3641
<collectors>
42+
<!-- Optional for modm:disco-f746ng -->
3743
<!-- <collect name="modm:build:cppdefines">CFG_TUSB_DEBUG=3</collect> -->
3844
</collectors>
3945
</library>

examples/nucleo_f446ze/usbserial/main.cpp

Lines changed: 0 additions & 56 deletions
This file was deleted.

examples/nucleo_f446ze/usbserial/project.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

examples/samd21_xplained_pro/usbserial/main.cpp

Lines changed: 0 additions & 44 deletions
This file was deleted.

examples/samd21_xplained_pro/usbserial/project.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/same54_xplained_pro/usbserial/main.cpp

Lines changed: 0 additions & 44 deletions
This file was deleted.

examples/same54_xplained_pro/usbserial/project.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/samg55_xplained_pro/usbserial/main.cpp

Lines changed: 0 additions & 29 deletions
This file was deleted.

examples/samg55_xplained_pro/usbserial/project.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/modm/board/samg55_xplained_pro/board.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ initialize()
8989
inline void
9090
initializeUsbFs()
9191
{
92+
// Pull DP low briefly on reset to make sure USB host disconnects/reconnects
93+
MATRIX->CCFG_SYSIO |= (CCFG_SYSIO_SYSIO11 | CCFG_SYSIO_SYSIO10);
94+
GpioA22::setOutput(false);
95+
modm::delay_ms(5);
96+
GpioA22::setInput();
97+
9298
SystemClock::enableUsb();
9399
Usb::initialize<Board::SystemClock>();
94100
}

0 commit comments

Comments
 (0)