Skip to content

Commit fb5f16e

Browse files
authored
Merge pull request #15 from stm32-rs/travis-bors
add travis-ci and bors config
2 parents 4287c35 + a91afe6 commit fb5f16e

File tree

8 files changed

+65
-6
lines changed

8 files changed

+65
-6
lines changed

.github/bors.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
block_labels = [ "S-blocked" ]
2+
delete_merged_branches = true
3+
status = [ "continuous-integration/travis-ci/push" ]

.github/force-pac-master.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
git clone https://github.com/stm32-rs/stm32-rs
6+
cd stm32-rs
7+
cargo install --force svd2rust
8+
# cargo install form # not needed here
9+
rustup component add rustfmt
10+
# pip install --user pyyaml # already installed
11+
cd svd
12+
./extract.sh
13+
cd ..
14+
make patch CRATES=stm32h7
15+
make -j$(nproc) svd2rust CRATES=stm32h7
16+
cd ..
17+
18+
sed -i 's|/your/path/here/||' Cargo.toml

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
language: rust
2+
3+
rust:
4+
- nightly
5+
# - beta
6+
# - stable
7+
8+
cache: cargo
9+
10+
branches:
11+
only:
12+
- staging
13+
- trying
14+
- master
15+
16+
before_script:
17+
- rustup target add thumbv7em-none-eabihf
18+
- ./.github/force-pac-master.sh
19+
20+
env:
21+
- MCU=stm32h742
22+
- MCU=stm32h743
23+
- MCU=stm32h753
24+
- MCU=stm32h750
25+
26+
matrix:
27+
allow_failures:
28+
# - rust: nightly
29+
fast_finish: true
30+
31+
script:
32+
- RUSTFLAGS="-D warnings" cargo build --release --examples --features rt,$MCU
33+
34+
notifications:
35+
email: false

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ version = "0.1.0"
44
authors = ["Andrew Straw <[email protected]>",
55
"Richard Meadows <[email protected]>",
66
"Henrik Böving <[email protected]>",
7-
"Jan Adä <[email protected]>"]
7+
"Jan Adä <[email protected]>",
8+
"Robert Jördens <[email protected]>"]
89
edition = "2018"
910
categories = ["embedded", "hardware-support", "no-std"]
1011
description = "Peripheral access API for STM32H7 series microcontrollers"

examples/adc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![deny(unsafe_code)]
22
#![no_main]
33
#![no_std]
4-
#![feature(type_alias_enum_variants)]
54

65
extern crate panic_itm;
76

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![no_std]
22
#![allow(non_camel_case_types)]
3-
#![feature(type_alias_enum_variants)]
43

54
#[derive(Debug)]
65
pub enum Never {}
@@ -64,4 +63,4 @@ pub mod timer;
6463
#[cfg(feature = "device-selected")]
6564
pub mod watchdog;
6665
#[cfg(feature = "device-selected")]
67-
pub mod adc;
66+
pub mod adc;

src/rcc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,6 @@ impl Rcc {
492492
180..=224 => (4, 2),
493493
_ => (7, 3),
494494
},
495-
_ => (7, 3),
496495
};
497496

498497
let flash = unsafe { &(*FLASH::ptr()) };

src/timer.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,12 @@ macro_rules! hal {
157157
}
158158
}
159159

160-
#[cfg(any(feature = "stm32h7x3"))]
160+
#[cfg(any(
161+
feature = "stm32h742",
162+
feature = "stm32h743",
163+
feature = "stm32h753",
164+
feature = "stm32h750",
165+
))]
161166
hal! {
162167
TIM1: (tim1, APB2, tim1en, tim1rst, enr, rstr),
163168
TIM2: (tim2, APB1, tim2en, tim2rst, lenr, lrstr),

0 commit comments

Comments
 (0)