Skip to content

Commit cb7e16e

Browse files
authored
Updates to dependencies / serial port updates (#214)
* rename config to config.toml * Updates for usb serial port handling * allow manual triggering of workflow * Revert "allow manual triggering of workflow" This reverts commit 34751f3. * Addition of additional dependency updates * minor update to embedded-graphics in dev depends * updates to cortex-m-semihosting * updates to Changelog
1 parent f6a5d1f commit cb7e16e

File tree

13 files changed

+62
-44
lines changed

13 files changed

+62
-44
lines changed
File renamed without changes.

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,28 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
- Updated `stm32f7` dependency 0.14.0 -> 0.15
1313
- Use PascalCase for generated values of enums ([stm32-rs#727](https://github.com/stm32-rs/stm32-rs/pull/727))
14-
- Updated `synopsys-usb-otg` dependency 0.2.3 -> 0.3
14+
- Updated `synopsys-usb-otg` dependency 0.2.3 -> 0.4.0
1515
- Updated `stm32-fmc` dependency 0.2.0 -> 0.3
1616
- Added Interruptable trait to Alternate mode pins
1717
- Added a "low pin count" variant of the f730 chip to the crate features: packages <144 pins don't include a high speed USB PHY
1818
- Added SPI2_SCK pin for stm32f769i-discovery
1919
- Fix mass-erase triggering in `flash` on smaller chips
2020
- Remove the need for software u64 division in the clock setup code, shrinking code (#211)
21+
- Updated `cortex-m` dependency 0.7.4 -> 0.7.7
22+
- Updated `nb` dependency 1.0 -> 1.1.0
23+
- Updated `micromath` dependency 2.0 -> 2.1.0
24+
- Updated `fugit` dependency 0.3.5 -> 0.3.7
25+
- Updated `bitflags` dependency 1.3.2 -> 2.6.0
26+
- Updated `embedded-hal` dependency 0.2.3 -> 0.2.7
27+
- Updated `display-interface` dependency 0.4.1 -> 0.5.0
28+
- Updated `cortex-m-semihosting` development dependency 0.3.3 -> 0.5.0
29+
- Removed unwrap from the end of hprintln / hprint for new version of semihosting
30+
- Updated `panic-semihosting` development dependency 0.5.2 -> 0.6.0
31+
- Updated `embedded-graphics` development dependency 0.6.1 -> 0.6.2
32+
- Updated `usb-device` development dependency 0.2.5 -> 0.3.2
33+
- Updated `usbd-serial` development dependency 0.1.0 -> 0.2.2
34+
- Updated usb serial example to use new api
35+
- Renamed .cargo/config -> .cargo/config.toml
2136

2237
## [v0.7.0] - 2022-06-05
2338

Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ features = ["stm32f746", "rt"]
1818

1919
[dependencies]
2020
as-slice = "0.2"
21-
cortex-m = "0.7.4"
21+
cortex-m = "0.7.7"
2222
cortex-m-rt = ">=0.6.15, <0.8"
23-
nb = "1.0"
23+
nb = "1.1.0"
2424
stm32f7 = "0.15"
25-
micromath = "2.0"
26-
synopsys-usb-otg = { version = "0.3", features = ["cortex-m"], optional = true }
25+
micromath = "2.1.0"
26+
synopsys-usb-otg = { version = "0.4.0", features = ["cortex-m"], optional = true }
2727
stm32-fmc = { version = "0.3", features = ["sdram"], optional = true }
2828
rand_core = "0.6"
2929
bxcan = "0.7"
3030
bare-metal = "1.0"
31-
fugit = "0.3.5"
31+
fugit = "0.3.7"
3232
fugit-timer = "0.1.3"
33-
bitflags = "1.3.2"
33+
bitflags = "2.6.0"
3434
rtic-monotonic = { version = "1.0", optional = true }
3535

3636
[dependencies.time]
@@ -43,23 +43,23 @@ version = "0.3.0"
4343

4444
[dependencies.embedded-hal]
4545
features = ["unproven"]
46-
version = "0.2.3"
46+
version = "0.2.7"
4747

4848
[dependencies.void]
4949
default-features = false
5050
version = "1.0.2"
5151

5252
[dependencies.display-interface]
5353
optional = true
54-
version = "0.4.1"
54+
version = "0.5.0"
5555

5656
[dev-dependencies]
57-
cortex-m-semihosting = "0.3.3"
57+
cortex-m-semihosting = "0.5.0"
5858
panic-halt = "0.2.0"
59-
panic-semihosting = "0.5.2"
60-
embedded-graphics = "0.6.1"
61-
usb-device = "0.2.5"
62-
usbd-serial = "0.1.0"
59+
panic-semihosting = "0.6.0"
60+
embedded-graphics = "0.6.2"
61+
usb-device = "0.3.2"
62+
usbd-serial = "0.2.2"
6363

6464
[dev-dependencies.time]
6565
version = "0.3"

examples/flash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn main() -> ! {
3939

4040
// Compare the written data with the expected value.
4141
if flash_data == DATA {
42-
hprintln!("Flash programming successful").unwrap();
42+
hprintln!("Flash programming successful");
4343
}
4444

4545
loop {}

examples/fmc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ fn main() -> ! {
124124
}
125125
}
126126

127-
hprintln!("Success!").unwrap();
127+
hprintln!("Success!");
128128

129129
loop {}
130130
}

examples/hello.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ use cortex_m_semihosting::hprintln;
1313

1414
#[entry]
1515
fn main() -> ! {
16-
hprintln!("Hello, world!").unwrap();
16+
hprintln!("Hello, world!");
1717
loop {}
1818
}

examples/i2c_scanner.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,26 @@ fn main() -> ! {
3636
50_000,
3737
);
3838

39-
hprintln!("Start i2c scanning...").expect("Error using hprintln.");
40-
hprintln!().unwrap();
39+
hprintln!("Start i2c scanning...");
40+
hprintln!();
4141

4242
for addr in 0x00_u8..0x80 {
4343
// Write the empty array and check the slave response.
4444
let byte: [u8; 1] = [0; 1];
4545
if VALID_ADDR_RANGE.contains(&addr) && i2c.write(addr, &byte).is_ok() {
46-
hprint!("{:02x}", addr).unwrap();
46+
hprint!("{:02x}", addr);
4747
} else {
48-
hprint!("..").unwrap();
48+
hprint!("..");
4949
}
5050
if addr % 0x10 == 0x0F {
51-
hprintln!().unwrap();
51+
hprintln!();
5252
} else {
53-
hprint!(" ").unwrap();
53+
hprint!(" ");
5454
}
5555
}
5656

57-
hprintln!().unwrap();
58-
hprintln!("Done!").unwrap();
57+
hprintln!();
58+
hprintln!("Done!");
5959

6060
loop {}
6161
}

examples/rng.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn main() -> ! {
1515
let p = pac::Peripherals::take().unwrap();
1616
let mut rng = p.RNG.init();
1717
let val = rng.get_rand().unwrap();
18-
hprintln!("random value {}", val).unwrap();
18+
hprintln!("random value {}", val);
1919
loop {
2020
core::hint::spin_loop();
2121
}

examples/rtc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ fn main() -> ! {
5050
// rtc.set_minutes(59).unwrap();
5151
// rtc.set_seconds(59).unwrap();
5252
loop {
53-
hprintln!("{}", rtc.get_datetime()).unwrap();
53+
hprintln!("{}", rtc.get_datetime());
5454
}
5555
}

examples/stm32f7disco-qspi-flash/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn memory_example_polling(mt25q: &mut mt25q::Mt25q) {
9797
}
9898
}
9999

100-
hprintln!("Flash device memory test successful!").unwrap();
100+
hprintln!("Flash device memory test successful!");
101101
}
102102

103103
fn memory_example_dma(
@@ -174,5 +174,5 @@ fn memory_example_dma(
174174
}
175175
}
176176

177-
hprintln!("Flash device memory DMA test successful!").unwrap();
177+
hprintln!("Flash device memory DMA test successful!");
178178
}

examples/timer-periph.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,32 @@ fn main() -> ! {
3030
let mut timer = dp.TIM1.counter_ms(&clocks);
3131
timer.start(1.secs()).unwrap();
3232

33-
hprintln!("hello!").unwrap();
33+
hprintln!("hello!");
3434
// wait until timer expires
3535
nb::block!(timer.wait()).unwrap();
36-
hprintln!("timer expired 1").unwrap();
36+
hprintln!("timer expired 1");
3737

3838
// the function counter_ms() creates a periodic timer, so it is automatically
3939
// restarted
4040
nb::block!(timer.wait()).unwrap();
41-
hprintln!("timer expired 2").unwrap();
41+
hprintln!("timer expired 2");
4242

4343
// cancel current timer
4444
timer.cancel().unwrap();
4545

4646
// start it again
4747
timer.start(1.secs()).unwrap();
4848
nb::block!(timer.wait()).unwrap();
49-
hprintln!("timer expired 3").unwrap();
49+
hprintln!("timer expired 3");
5050

5151
timer.cancel().unwrap();
5252
let cancel_outcome = timer.cancel();
5353
assert_eq!(cancel_outcome, Err(Error::Disabled));
54-
hprintln!("ehy, you cannot cancel a timer two times!").unwrap();
54+
hprintln!("ehy, you cannot cancel a timer two times!");
5555
// this time the timer was not restarted, therefore this function should
5656
// wait forever
5757
nb::block!(timer.wait()).unwrap();
5858
// you should never see this print
59-
hprintln!("if you see this there is something wrong").unwrap();
59+
hprintln!("if you see this there is something wrong");
6060
panic!();
6161
}

examples/timer-syst.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,32 @@ fn main() -> ! {
3131
let mut timer = cp.SYST.counter_us(&clocks);
3232
timer.start(42.millis()).unwrap();
3333

34-
hprintln!("hello!").unwrap();
34+
hprintln!("hello!");
3535
// wait until timer expires
3636
nb::block!(timer.wait()).unwrap();
37-
hprintln!("timer expired 1").unwrap();
37+
hprintln!("timer expired 1");
3838

3939
// the function syst() creates a periodic timer, so it is automatically
4040
// restarted
4141
nb::block!(timer.wait()).unwrap();
42-
hprintln!("timer expired 2").unwrap();
42+
hprintln!("timer expired 2");
4343

4444
// cancel current timer
4545
timer.cancel().unwrap();
4646

4747
// start it again
4848
timer.start(42.millis()).unwrap();
4949
nb::block!(timer.wait()).unwrap();
50-
hprintln!("timer expired 3").unwrap();
50+
hprintln!("timer expired 3");
5151

5252
timer.cancel().unwrap();
5353
let cancel_outcome = timer.cancel();
5454
assert_eq!(cancel_outcome, Err(Error::Disabled));
55-
hprintln!("ehy, you cannot cancel a timer two times!").unwrap();
55+
hprintln!("ehy, you cannot cancel a timer two times!");
5656
// this time the timer was not restarted, therefore this function should
5757
// wait forever
5858
nb::block!(timer.wait()).unwrap();
5959
// you should never see this print
60-
hprintln!("if you see this there is something wrong").unwrap();
60+
hprintln!("if you see this there is something wrong");
6161
panic!();
6262
}

examples/usb_serial.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,14 @@ fn main() -> ! {
7777
let mut serial = usbd_serial::SerialPort::new(&usb_bus);
7878

7979
let mut usb_dev = UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27dd))
80-
.manufacturer("Fake company")
81-
.product("Serial port")
82-
.serial_number("TEST")
80+
.strings(&[StringDescriptors::default()
81+
.manufacturer("Fake company")
82+
.product("Serial port")
83+
.serial_number("TEST")
84+
]).unwrap()
8385
.device_class(usbd_serial::USB_CLASS_CDC)
8486
.max_packet_size_0(64) // Size required for HS, and ok for FS
87+
.unwrap()
8588
.build();
8689

8790
loop {

0 commit comments

Comments
 (0)