Skip to content

Commit 9ce50b5

Browse files
author
Jonas Schievink
committed
Fix USB demo
1 parent 74b797e commit 9ce50b5

File tree

6 files changed

+67
-56
lines changed

6 files changed

+67
-56
lines changed

examples/usb/.cargo/config

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

examples/usb/Embed.toml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[default.probe]
2+
# USB vendor ID
3+
# usb_vid = "1337"
4+
# USB product ID
5+
# usb_pid = "1337"
6+
# Serial number
7+
# serial = "12345678"
8+
# The protocol to be used for communicating with the target.
9+
protocol = "Swd"
10+
# The speed in kHz of the data link to the target.
11+
# speed = 1337
12+
13+
[default.flashing]
14+
# Whether or not the target should be flashed.
15+
enabled = true
16+
# Whether or not the target should be halted after reset.
17+
# DEPRECATED, moved to reset section
18+
halt_afterwards = false
19+
# Whether or not bytes erased but not rewritten with data from the ELF
20+
# should be restored with their contents before erasing.
21+
restore_unwritten_bytes = false
22+
# The path where an SVG of the assembled flash layout should be written to.
23+
# flash_layout_output_path = "out.svg"
24+
25+
[default.reset]
26+
# Whether or not the target should be reset.
27+
# When flashing is enabled as well, the target will be reset after flashing.
28+
enabled = true
29+
# Whether or not the target should be halted after reset.
30+
halt_afterwards = false
31+
32+
[default.general]
33+
# The chip name of the chip to be debugged.
34+
chip = "nRF52840"
35+
# A list of chip descriptions to be loaded during runtime.
36+
chip_descriptions = []
37+
# The default log level to be used. Possible values are one of:
38+
# "OFF", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"
39+
log_level = "WARN"
40+
41+
[default.rtt]
42+
# Whether or not an RTTUI should be opened after flashing.
43+
# This is exclusive and cannot be used with GDB at the moment.
44+
enabled = true
45+
# A list of channel associations to be displayed. If left empty, all channels are displayed.
46+
channels = [
47+
# { up = 0, down = 0, name = "name", format = "String" }
48+
]
49+
# The duration in ms for which the logger should retry to attach to RTT.
50+
timeout = 3000
51+
# Whether timestamps in the RTTUI are enabled
52+
show_timestamps = true
53+
# Whether to save rtt history buffer on exit.
54+
log_enabled = false
55+
# Where to save rtt history buffer relative to manifest path.
56+
log_path = "./logs"
57+
58+
[default.gdb]
59+
# Whether or not a GDB server should be opened after flashing.
60+
# This is exclusive and cannot be used with RTT at the moment.
61+
enabled = false
62+
# The connection string in host:port format wher the GDB server will open a socket.
63+
# gdb_connection_string

examples/usb/README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
# spi-demo
2-
SPIM demonstation code.
3-
Connect a resistor between pin 22 and 23 on the demo board to feed MOSI directly back to MISO
4-
If all tests pass all four Led (Led1 to Led4) will light up, in case of error only at least one of the Led will remain turned off.
1+
# USB examples
52

3+
This demo provides two binaries:
64

7-
## HW connections
8-
Pin Connecton
9-
P0.24 SPIclk
10-
P0.23 MOSI
11-
P0.22 MISO
12-
13-
This is designed for nRF52-DK board:
14-
https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK
5+
- `serial`: a USB serial "echo" example.
6+
- `test_class`: exposes the test device from the `usb-device` crate.
File renamed without changes.

examples/usb/src/main.rs

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

0 commit comments

Comments
 (0)