Skip to content

Commit 7271f39

Browse files
authored
Bump e-g core (#181)
1 parent 0dc72c8 commit 7271f39

16 files changed

+214
-224
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
target_steps: &target_steps
22
docker:
3-
- image: cimg/rust:1.57.0
3+
- image: cimg/rust:1.61.0
44
steps:
55
- checkout
66
- restore_cache:

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616

1717
### Changed
1818

19-
- **(breaking)** [#175](https://github.com/jamwaffles/ssd1306/pull/175) Increased MSRV to 1.57.0
19+
- **(breaking)** [#184](https://github.com/jamwaffles/ssd1306/pull/184) Increased MSRV to 1.61.0
2020
- **(breaking)** [#179](https://github.com/jamwaffles/ssd1306/pull/179) Changed `Ssd1306::reset` signature.
21+
- [#181](https://github.com/jamwaffles/ssd1306/pull/181) Update embedded-graphics-core dependency to 0.4
2122

2223
## [0.7.1] - 2022-08-15
2324

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/jamwaffles/ssd1306"
1111
version = "0.7.1"
1212
edition = "2018"
1313
exclude = [ "build.rs", "build.sh", "memory.x", "doc", "*.jpg", "*.png", "*.bmp" ]
14-
rust-version = "1.57"
14+
rust-version = "1.61"
1515

1616
[badges]
1717
circle-ci = { repository = "jamwaffles/ssd1306", branch = "master" }
@@ -24,20 +24,20 @@ embedded-hal = "0.2.5"
2424
display-interface = "0.4.1"
2525
display-interface-i2c = "0.4.0"
2626
display-interface-spi = "0.4.1"
27-
embedded-graphics-core = { version = "0.3.2", optional = true }
27+
embedded-graphics-core = { version = "0.4.0", optional = true }
2828

2929
[dev-dependencies]
3030
cortex-m = "0.7.2"
31-
cortex-m-rt = "0.6.14"
32-
cortex-m-rtic = "0.5.6"
31+
cortex-m-rt = "0.7.3"
32+
cortex-m-rtic = "1.1.4"
3333
panic-halt = "0.2.0"
3434
cast = { version = "0.2.6", default-features = false }
3535
# Used to load BMP images in various examples
36-
tinybmp = "0.3.1"
37-
embedded-graphics = "0.7.1"
36+
tinybmp = "0.5.0"
37+
embedded-graphics = "0.8.0"
3838
# Used by the noise_i2c examples
3939
rand = { version = "0.8.4", default-features = false, features = [ "small_rng" ] }
40-
stm32f1xx-hal = { version = "0.7.0", features = [ "rt", "stm32f103" ] }
40+
stm32f1xx-hal = { version = "0.10.0", features = [ "rt", "stm32f103" ] }
4141

4242
[features]
4343
default = ["graphics"]

examples/bmp_i2c.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ fn main() -> ! {
3737
let dp = stm32::Peripherals::take().unwrap();
3838

3939
let mut flash = dp.FLASH.constrain();
40-
let mut rcc = dp.RCC.constrain();
40+
let rcc = dp.RCC.constrain();
4141

4242
let clocks = rcc.cfgr.freeze(&mut flash.acr);
4343

44-
let mut afio = dp.AFIO.constrain(&mut rcc.apb2);
44+
let mut afio = dp.AFIO.constrain();
4545

46-
let mut gpiob = dp.GPIOB.split(&mut rcc.apb2);
46+
let mut gpiob = dp.GPIOB.split();
4747

4848
let scl = gpiob.pb8.into_alternate_open_drain(&mut gpiob.crh);
4949
let sda = gpiob.pb9.into_alternate_open_drain(&mut gpiob.crh);
@@ -53,11 +53,10 @@ fn main() -> ! {
5353
(scl, sda),
5454
&mut afio.mapr,
5555
Mode::Fast {
56-
frequency: 400_000.hz(),
56+
frequency: 400_000.Hz(),
5757
duty_cycle: DutyCycle::Ratio2to1,
5858
},
5959
clocks,
60-
&mut rcc.apb1,
6160
1000,
6261
10,
6362
1000,
@@ -85,6 +84,6 @@ fn main() -> ! {
8584
}
8685

8786
#[exception]
88-
fn HardFault(ef: &ExceptionFrame) -> ! {
87+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
8988
panic!("{:#?}", ef);
9089
}

examples/graphics.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ use embedded_graphics::{
2929
use panic_halt as _;
3030
use ssd1306::{prelude::*, Ssd1306};
3131
use stm32f1xx_hal::{
32-
delay::Delay,
3332
prelude::*,
3433
spi::{Mode, Phase, Polarity, Spi},
3534
stm32,
35+
timer::Timer,
3636
};
3737

3838
#[entry]
@@ -41,21 +41,21 @@ fn main() -> ! {
4141
let dp = stm32::Peripherals::take().unwrap();
4242

4343
let mut flash = dp.FLASH.constrain();
44-
let mut rcc = dp.RCC.constrain();
44+
let rcc = dp.RCC.constrain();
4545

4646
let clocks = rcc.cfgr.freeze(&mut flash.acr);
4747

48-
let mut afio = dp.AFIO.constrain(&mut rcc.apb2);
48+
let mut afio = dp.AFIO.constrain();
4949

50-
let mut gpioa = dp.GPIOA.split(&mut rcc.apb2);
51-
let mut gpiob = dp.GPIOB.split(&mut rcc.apb2);
50+
let mut gpioa = dp.GPIOA.split();
51+
let mut gpiob = dp.GPIOB.split();
5252

5353
// SPI1
5454
let sck = gpioa.pa5.into_alternate_push_pull(&mut gpioa.crl);
5555
let miso = gpioa.pa6;
5656
let mosi = gpioa.pa7.into_alternate_push_pull(&mut gpioa.crl);
5757

58-
let mut delay = Delay::new(cp.SYST, clocks);
58+
let mut delay = Timer::syst(cp.SYST, &clocks).delay();
5959

6060
let mut rst = gpiob.pb0.into_push_pull_output(&mut gpiob.crl);
6161
let dc = gpiob.pb1.into_push_pull_output(&mut gpiob.crl);
@@ -68,9 +68,8 @@ fn main() -> ! {
6868
polarity: Polarity::IdleLow,
6969
phase: Phase::CaptureOnFirstTransition,
7070
},
71-
8.mhz(),
71+
8.MHz(),
7272
clocks,
73-
&mut rcc.apb2,
7473
);
7574

7675
let interface = display_interface_spi::SPIInterfaceNoCS::new(spi, dc);
@@ -123,6 +122,6 @@ fn main() -> ! {
123122
}
124123

125124
#[exception]
126-
fn HardFault(ef: &ExceptionFrame) -> ! {
125+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
127126
panic!("{:#?}", ef);
128127
}

examples/graphics_i2c.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ fn main() -> ! {
3636
let dp = stm32::Peripherals::take().unwrap();
3737

3838
let mut flash = dp.FLASH.constrain();
39-
let mut rcc = dp.RCC.constrain();
39+
let rcc = dp.RCC.constrain();
4040

4141
let clocks = rcc.cfgr.freeze(&mut flash.acr);
4242

43-
let mut afio = dp.AFIO.constrain(&mut rcc.apb2);
43+
let mut afio = dp.AFIO.constrain();
4444

45-
let mut gpiob = dp.GPIOB.split(&mut rcc.apb2);
45+
let mut gpiob = dp.GPIOB.split();
4646

4747
let scl = gpiob.pb8.into_alternate_open_drain(&mut gpiob.crh);
4848
let sda = gpiob.pb9.into_alternate_open_drain(&mut gpiob.crh);
@@ -52,11 +52,10 @@ fn main() -> ! {
5252
(scl, sda),
5353
&mut afio.mapr,
5454
Mode::Fast {
55-
frequency: 400_000.hz(),
55+
frequency: 400_000.Hz(),
5656
duty_cycle: DutyCycle::Ratio2to1,
5757
},
5858
clocks,
59-
&mut rcc.apb1,
6059
1000,
6160
10,
6261
1000,
@@ -111,6 +110,6 @@ fn main() -> ! {
111110
}
112111

113112
#[exception]
114-
fn HardFault(ef: &ExceptionFrame) -> ! {
113+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
115114
panic!("{:#?}", ef);
116115
}

examples/graphics_i2c_128x32.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ fn main() -> ! {
3636
let dp = stm32::Peripherals::take().unwrap();
3737

3838
let mut flash = dp.FLASH.constrain();
39-
let mut rcc = dp.RCC.constrain();
39+
let rcc = dp.RCC.constrain();
4040

4141
let clocks = rcc.cfgr.freeze(&mut flash.acr);
4242

43-
let mut afio = dp.AFIO.constrain(&mut rcc.apb2);
43+
let mut afio = dp.AFIO.constrain();
4444

45-
let mut gpiob = dp.GPIOB.split(&mut rcc.apb2);
45+
let mut gpiob = dp.GPIOB.split();
4646

4747
let scl = gpiob.pb8.into_alternate_open_drain(&mut gpiob.crh);
4848
let sda = gpiob.pb9.into_alternate_open_drain(&mut gpiob.crh);
@@ -52,11 +52,10 @@ fn main() -> ! {
5252
(scl, sda),
5353
&mut afio.mapr,
5454
Mode::Fast {
55-
frequency: 400_000.hz(),
55+
frequency: 400_000.Hz(),
5656
duty_cycle: DutyCycle::Ratio2to1,
5757
},
5858
clocks,
59-
&mut rcc.apb1,
6059
1000,
6160
10,
6261
1000,
@@ -111,6 +110,6 @@ fn main() -> ! {
111110
}
112111

113112
#[exception]
114-
fn HardFault(ef: &ExceptionFrame) -> ! {
113+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
115114
panic!("{:#?}", ef);
116115
}

examples/graphics_i2c_72x40.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ fn main() -> ! {
3636
let dp = stm32::Peripherals::take().unwrap();
3737

3838
let mut flash = dp.FLASH.constrain();
39-
let mut rcc = dp.RCC.constrain();
39+
let rcc = dp.RCC.constrain();
4040

4141
let clocks = rcc.cfgr.freeze(&mut flash.acr);
4242

43-
let mut afio = dp.AFIO.constrain(&mut rcc.apb2);
43+
let mut afio = dp.AFIO.constrain();
4444

45-
let mut gpiob = dp.GPIOB.split(&mut rcc.apb2);
45+
let mut gpiob = dp.GPIOB.split();
4646

4747
let scl = gpiob.pb8.into_alternate_open_drain(&mut gpiob.crh);
4848
let sda = gpiob.pb9.into_alternate_open_drain(&mut gpiob.crh);
@@ -52,11 +52,10 @@ fn main() -> ! {
5252
(scl, sda),
5353
&mut afio.mapr,
5454
Mode::Fast {
55-
frequency: 400_000.hz(),
55+
frequency: 400_000.Hz(),
5656
duty_cycle: DutyCycle::Ratio2to1,
5757
},
5858
clocks,
59-
&mut rcc.apb1,
6059
1000,
6160
10,
6261
1000,
@@ -122,6 +121,6 @@ fn main() -> ! {
122121
}
123122

124123
#[exception]
125-
fn HardFault(ef: &ExceptionFrame) -> ! {
124+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
126125
panic!("{:#?}", ef);
127126
}

examples/image_i2c.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ fn main() -> ! {
4242
let dp = stm32::Peripherals::take().unwrap();
4343

4444
let mut flash = dp.FLASH.constrain();
45-
let mut rcc = dp.RCC.constrain();
45+
let rcc = dp.RCC.constrain();
4646

4747
let clocks = rcc.cfgr.freeze(&mut flash.acr);
4848

49-
let mut afio = dp.AFIO.constrain(&mut rcc.apb2);
49+
let mut afio = dp.AFIO.constrain();
5050

51-
let mut gpiob = dp.GPIOB.split(&mut rcc.apb2);
51+
let mut gpiob = dp.GPIOB.split();
5252

5353
let scl = gpiob.pb8.into_alternate_open_drain(&mut gpiob.crh);
5454
let sda = gpiob.pb9.into_alternate_open_drain(&mut gpiob.crh);
@@ -58,11 +58,10 @@ fn main() -> ! {
5858
(scl, sda),
5959
&mut afio.mapr,
6060
Mode::Fast {
61-
frequency: 400_000.hz(),
61+
frequency: 400_000.Hz(),
6262
duty_cycle: DutyCycle::Ratio2to1,
6363
},
6464
clocks,
65-
&mut rcc.apb1,
6665
1000,
6766
10,
6867
1000,
@@ -86,6 +85,6 @@ fn main() -> ! {
8685
}
8786

8887
#[exception]
89-
fn HardFault(ef: &ExceptionFrame) -> ! {
88+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
9089
panic!("{:#?}", ef);
9190
}

examples/noise_i2c.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ fn main() -> ! {
3434
let dp = stm32::Peripherals::take().unwrap();
3535

3636
let mut flash = dp.FLASH.constrain();
37-
let mut rcc = dp.RCC.constrain();
37+
let rcc = dp.RCC.constrain();
3838

3939
let clocks = rcc.cfgr.freeze(&mut flash.acr);
4040

41-
let mut afio = dp.AFIO.constrain(&mut rcc.apb2);
41+
let mut afio = dp.AFIO.constrain();
4242

43-
let mut gpiob = dp.GPIOB.split(&mut rcc.apb2);
43+
let mut gpiob = dp.GPIOB.split();
4444

4545
let scl = gpiob.pb8.into_alternate_open_drain(&mut gpiob.crh);
4646
let sda = gpiob.pb9.into_alternate_open_drain(&mut gpiob.crh);
@@ -50,11 +50,10 @@ fn main() -> ! {
5050
(scl, sda),
5151
&mut afio.mapr,
5252
Mode::Fast {
53-
frequency: 400_000.hz(),
53+
frequency: 400_000.Hz(),
5454
duty_cycle: DutyCycle::Ratio2to1,
5555
},
5656
clocks,
57-
&mut rcc.apb1,
5857
1000,
5958
10,
6059
1000,
@@ -77,6 +76,6 @@ fn main() -> ! {
7776
}
7877

7978
#[exception]
80-
fn HardFault(ef: &ExceptionFrame) -> ! {
79+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
8180
panic!("{:#?}", ef);
8281
}

0 commit comments

Comments
 (0)