Skip to content

Commit 6e70e3d

Browse files
committed
First public release
1 parent c237d99 commit 6e70e3d

30 files changed

+343
-153
lines changed

Cargo.toml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ members = [
2727

2828
[package]
2929
name = "drone-stm32-map"
30-
version = "0.9.0"
30+
version = "0.10.0"
3131
authors = ["Valentine Valyaeff <[email protected]>"]
3232
edition = "2018"
33+
exclude = ["/svd_files"]
3334
repository = "https://github.com/drone-os/drone-stm32-map"
35+
homepage = "https://www.drone-os.com/"
36+
documentation = "https://docs.rs/drone-stm32-map/0.10.0"
3437
readme = "README.md"
3538
license = "MIT OR Apache-2.0"
3639
keywords = [
@@ -236,54 +239,58 @@ stm32l4s9 = [
236239
]
237240

238241
[dependencies.drone-cortex-m]
239-
version = "0.9.0"
242+
version = "0.10.0"
240243
path = "../drone-cortex-m"
241244

242245
[dependencies.drone-stm32-map-pieces]
243-
version = "=0.9.0"
246+
version = "=0.10.0"
244247
path = "src/pieces"
245248

246249
[dependencies.drone-stm32-map-periph-adc]
247-
version = "=0.9.0"
250+
version = "=0.10.0"
248251
path = "src/periph/adc"
249252
optional = true
250253

251254
[dependencies.drone-stm32-map-periph-dma]
252-
version = "=0.9.0"
255+
version = "=0.10.0"
253256
path = "src/periph/dma"
254257
optional = true
255258

256259
[dependencies.drone-stm32-map-periph-exti]
257-
version = "=0.9.0"
260+
version = "=0.10.0"
258261
path = "src/periph/exti"
259262
optional = true
260263

261264
[dependencies.drone-stm32-map-periph-gpio]
262-
version = "=0.9.0"
265+
version = "=0.10.0"
263266
path = "src/periph/gpio"
264267
optional = true
265268

266269
[dependencies.drone-stm32-map-periph-i2c]
267-
version = "=0.9.0"
270+
version = "=0.10.0"
268271
path = "src/periph/i2c"
269272
optional = true
270273

271274
[dependencies.drone-stm32-map-periph-rtc]
272-
version = "=0.9.0"
275+
version = "=0.10.0"
273276
path = "src/periph/rtc"
274277
optional = true
275278

276279
[dependencies.drone-stm32-map-periph-spi]
277-
version = "=0.9.0"
280+
version = "=0.10.0"
278281
path = "src/periph/spi"
279282
optional = true
280283

281284
[dependencies.drone-stm32-map-periph-tim]
282-
version = "=0.9.0"
285+
version = "=0.10.0"
283286
path = "src/periph/tim"
284287
optional = true
285288

286289
[dependencies.drone-stm32-map-periph-uart]
287-
version = "=0.9.0"
290+
version = "=0.10.0"
288291
path = "src/periph/uart"
289292
optional = true
293+
294+
[package.metadata.docs.rs]
295+
default-target = "thumbv7em-none-eabihf"
296+
features = ["stm32l4s9"]

Justfile

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build_target := 'thumbv7em-none-eabihf'
2-
features := 'stm32l4s7'
2+
features := 'stm32l4s9'
33

44
# Install dependencies
55
deps:
@@ -20,6 +20,8 @@ lint:
2020

2121
# Check each feature
2222
check-all:
23+
rustup target add thumbv7m-none-eabi
24+
rustup target add thumbv7em-none-eabihf
2325
cargo check --package drone-stm32-map --features stm32f100 --target thumbv7m-none-eabi
2426
cargo check --package drone-stm32-map --features stm32f101 --target thumbv7m-none-eabi
2527
cargo check --package drone-stm32-map --features stm32f102 --target thumbv7m-none-eabi
@@ -50,29 +52,67 @@ doc-open: doc
5052
readme:
5153
cargo readme -o README.md
5254

55+
# Bump crate versions
56+
version-bump version drone-core-version drone-cortex-m-version:
57+
sed -i 's/\(docs\.rs\/drone-stm32-map\/\)[0-9]\+\(\.[0-9]\+\)\+/\1{{version}}/' \
58+
Cargo.toml src/lib.rs
59+
sed -i '/\[.*\]/h;/version = ".*"/{x;s/\[package\]/version = "{{version}}"/;t;x}' \
60+
Cargo.toml src/pieces/*/Cargo.toml src/pieces/Cargo.toml src/periph/*/Cargo.toml svd/Cargo.toml
61+
sed -i '/\[.*\]/h;/version = "=.*"/{x;s/\[.*drone-stm32-map-.*\]/version = "={{version}}"/;t;x}' \
62+
Cargo.toml src/pieces/*/Cargo.toml src/pieces/Cargo.toml src/periph/*/Cargo.toml
63+
sed -i '/\[.*\]/h;/version = ".*"/{x;s/\[.*drone-core\]/version = "{{drone-core-version}}"/;t;x}' \
64+
Cargo.toml src/pieces/*/Cargo.toml src/pieces/Cargo.toml src/periph/*/Cargo.toml
65+
sed -i '/\[.*\]/h;/version = ".*"/{x;s/\[.*drone-cortex-m\]/version = "{{drone-cortex-m-version}}"/;t;x}' \
66+
Cargo.toml src/pieces/*/Cargo.toml src/pieces/Cargo.toml src/periph/*/Cargo.toml
67+
sed -i 's/\(drone-stm32-map.*\)version = "[^"]\+"/\1version = "{{version}}"/' \
68+
src/lib.rs
69+
5370
# Publish to crates.io
5471
publish:
5572
cd svd && cargo publish
73+
sleep 5
5674
cd src/pieces/1 && cargo publish --target {{build_target}} --features "{{features}}"
75+
sleep 5
5776
cd src/pieces/2 && cargo publish --target {{build_target}} --features "{{features}}"
77+
sleep 5
5878
cd src/pieces/3 && cargo publish --target {{build_target}} --features "{{features}}"
79+
sleep 5
5980
cd src/pieces/4 && cargo publish --target {{build_target}} --features "{{features}}"
81+
sleep 5
6082
cd src/pieces/5 && cargo publish --target {{build_target}} --features "{{features}}"
83+
sleep 5
6184
cd src/pieces/6 && cargo publish --target {{build_target}} --features "{{features}}"
85+
sleep 5
6286
cd src/pieces/7 && cargo publish --target {{build_target}} --features "{{features}}"
87+
sleep 5
6388
cd src/pieces/8 && cargo publish --target {{build_target}} --features "{{features}}"
89+
sleep 5
6490
cd src/pieces/9 && cargo publish --target {{build_target}} --features "{{features}}"
91+
sleep 5
6592
cd src/pieces/10 && cargo publish --target {{build_target}} --features "{{features}}"
93+
sleep 5
6694
cd src/pieces/11 && cargo publish --target {{build_target}} --features "{{features}}"
95+
sleep 5
6796
cd src/pieces/12 && cargo publish --target {{build_target}} --features "{{features}}"
97+
sleep 5
6898
cd src/pieces && cargo publish --target {{build_target}} --features "{{features}}"
99+
sleep 5
69100
cd src/periph/adc && cargo publish --target {{build_target}} --features "{{features}}"
101+
sleep 5
70102
cd src/periph/dma && cargo publish --target {{build_target}} --features "{{features}}"
103+
sleep 5
71104
cd src/periph/exti && cargo publish --target {{build_target}} --features "{{features}}"
105+
sleep 5
72106
cd src/periph/gpio && cargo publish --target {{build_target}} --features "{{features}}"
107+
sleep 5
73108
cd src/periph/i2c && cargo publish --target {{build_target}} --features "{{features}}"
109+
sleep 5
74110
cd src/periph/rtc && cargo publish --target {{build_target}} --features "{{features}}"
111+
sleep 5
75112
cd src/periph/spi && cargo publish --target {{build_target}} --features "{{features}}"
113+
sleep 5
76114
cd src/periph/tim && cargo publish --target {{build_target}} --features "{{features}}"
115+
sleep 5
77116
cd src/periph/uart && cargo publish --target {{build_target}} --features "{{features}}"
117+
sleep 5
78118
cargo publish --target {{build_target}} --features "{{features}}"

README.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
[![Crates.io](https://img.shields.io/crates/v/drone-stm32-map.svg)](https://crates.io/crates/drone-stm32-map)
1+
[![crates.io](https://img.shields.io/crates/v/drone-stm32-map.svg)](https://crates.io/crates/drone-stm32-map)
2+
[![docs.rs](https://docs.rs/drone-stm32-map/badge.svg)](https://docs.rs/drone-stm32-map)
3+
![maintenance](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)
24

35
# drone-stm32-map
46

57
STM32 peripheral mappings for Drone, an Embedded Operating System.
68

7-
Supported devices:
9+
This crate uses
10+
[CMSIS-SVD](https://arm-software.github.io/CMSIS_5/SVD/html/index.html)
11+
files provided by [STMicroelectronics](https://www.st.com/) to automatically
12+
generate Drone register and interrupt bindings. However only the
13+
corresponding Reference Manual is the single source of truth. A difference
14+
between this crate bindings and the Reference Manual is considered a
15+
bug. Fixing such a bug is *not a breaking change*.
16+
17+
This crate re-exports the contents of [`drone_cortex_m::map`] module and is
18+
a drop-in replacement for it.
19+
20+
## Supported Devices
821

922
| Device name / Cargo feature | Core name | Reference manual |
1023
|-------------|-----------------------|--------------------------------------------------------------------------|
@@ -28,23 +41,25 @@ Supported devices:
2841
**NOTE** Exactly one cargo feature should be selected based on the device
2942
model.
3043

31-
This crate uses
32-
[CMSIS-SVD](https://arm-software.github.io/CMSIS_5/SVD/html/index.html)
33-
files provided by [STMicroelectronics](https://www.st.com/) to automatically
34-
generate Drone register and interrupt bindings. However only the
35-
corresponding Reference Manual is the single source of truth. A difference
36-
between this crate bindings and the Reference Manual is considered a
37-
bug. Fixing such a bug is *not a breaking change*.
44+
## Documentation
45+
46+
- [Drone Book](https://book.drone-os.com/)
47+
- [API documentation](https://docs.rs/drone-stm32-map/0.10.0)
48+
49+
The API documentation intentionally skips auto-generated [`reg`] and [`thr`]
50+
bindings. Otherwise it would use several gigabytes of space and would be
51+
very slow to render in a browser. One should refer to the Reference Manual
52+
instead. And to get an idea of what the API looks like on the Drone side,
53+
look at the [`drone_cortex_m::map`] module documentation.
54+
55+
## Usage
3856

39-
[API documentation](https://docs.rs/crate/drone-stm32-map) for this crate
40-
intentionally skips auto-generated [`reg`] and [`thr`] bindings. Otherwise
41-
it would use several gigabytes of space and would be very slow to render in
42-
a browser. One should refer to the Reference Manual instead. And to get an
43-
idea of what the API looks like on the Drone side, look to the
44-
[`drone_cortex_m::map`] module documentation.
57+
Place the following to the Cargo.toml:
4558

46-
This crate re-exports contents of [`drone_cortex_m::map`] module and is a
47-
drop-in replacement for it.
59+
```toml
60+
[dependencies]
61+
drone-stm32-map = { version = "0.10.0", features = [...] }
62+
```
4863

4964
## License
5065

README.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
[![Crates.io](https://img.shields.io/crates/v/{{crate}}.svg)](https://crates.io/crates/{{crate}})
1+
[![crates.io](https://img.shields.io/crates/v/{{crate}}.svg)](https://crates.io/crates/{{crate}})
2+
[![docs.rs](https://docs.rs/{{crate}}/badge.svg)](https://docs.rs/{{crate}})
3+
![maintenance](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)
24

35
# {{crate}}
46

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2019-08-26
1+
nightly-2019-09-13

src/lib.rs

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
//! STM32 peripheral mappings for Drone, an Embedded Operating System.
22
//!
3-
//! Supported devices:
3+
//! This crate uses
4+
//! [CMSIS-SVD](https://arm-software.github.io/CMSIS_5/SVD/html/index.html)
5+
//! files provided by [STMicroelectronics](https://www.st.com/) to automatically
6+
//! generate Drone register and interrupt bindings. However only the
7+
//! corresponding Reference Manual is the single source of truth. A difference
8+
//! between this crate bindings and the Reference Manual is considered a
9+
//! bug. Fixing such a bug is *not a breaking change*.
10+
//!
11+
//! This crate re-exports the contents of [`drone_cortex_m::map`] module and is
12+
//! a drop-in replacement for it.
13+
//!
14+
//! # Supported Devices
415
//!
516
//! | Device name / Cargo feature | Core name | Reference manual |
617
//! |-------------|-----------------------|--------------------------------------------------------------------------|
@@ -24,23 +35,25 @@
2435
//! **NOTE** Exactly one cargo feature should be selected based on the device
2536
//! model.
2637
//!
27-
//! This crate uses
28-
//! [CMSIS-SVD](https://arm-software.github.io/CMSIS_5/SVD/html/index.html)
29-
//! files provided by [STMicroelectronics](https://www.st.com/) to automatically
30-
//! generate Drone register and interrupt bindings. However only the
31-
//! corresponding Reference Manual is the single source of truth. A difference
32-
//! between this crate bindings and the Reference Manual is considered a
33-
//! bug. Fixing such a bug is *not a breaking change*.
38+
//! # Documentation
39+
//!
40+
//! - [Drone Book](https://book.drone-os.com/)
41+
//! - [API documentation](https://docs.rs/drone-stm32-map/0.10.0)
42+
//!
43+
//! The API documentation intentionally skips auto-generated [`reg`] and [`thr`]
44+
//! bindings. Otherwise it would use several gigabytes of space and would be
45+
//! very slow to render in a browser. One should refer to the Reference Manual
46+
//! instead. And to get an idea of what the API looks like on the Drone side,
47+
//! look at the [`drone_cortex_m::map`] module documentation.
48+
//!
49+
//! # Usage
3450
//!
35-
//! [API documentation](https://docs.rs/crate/drone-stm32-map) for this crate
36-
//! intentionally skips auto-generated [`reg`] and [`thr`] bindings. Otherwise
37-
//! it would use several gigabytes of space and would be very slow to render in
38-
//! a browser. One should refer to the Reference Manual instead. And to get an
39-
//! idea of what the API looks like on the Drone side, look to the
40-
//! [`drone_cortex_m::map`] module documentation.
51+
//! Place the following to the Cargo.toml:
4152
//!
42-
//! This crate re-exports contents of [`drone_cortex_m::map`] module and is a
43-
//! drop-in replacement for it.
53+
//! ```toml
54+
//! [dependencies]
55+
//! drone-stm32-map = { version = "0.10.0", features = [...] }
56+
//! ```
4457
4558
#![deny(elided_lifetimes_in_paths)]
4659
#![warn(missing_docs)]

src/periph/adc/Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[package]
22
name = "drone-stm32-map-periph-adc"
3-
version = "0.9.0"
3+
version = "0.10.0"
44
authors = ["Valentine Valyaeff <[email protected]>"]
55
edition = "2018"
66
repository = "https://github.com/drone-os/drone-stm32-map"
7+
homepage = "https://www.drone-os.com/"
78
license = "MIT OR Apache-2.0"
89
description = """
910
STM32 peripheral mappings for Drone, an Embedded Operating System.
@@ -32,13 +33,17 @@ stm32l4s7 = ["drone-cortex-m/cortex_m4f_r0p1", "drone-stm32-map-pieces/stm32l4s7
3233
stm32l4s9 = ["drone-cortex-m/cortex_m4f_r0p1", "drone-stm32-map-pieces/stm32l4s9"]
3334

3435
[dependencies.drone-core]
35-
version = "0.9.0"
36+
version = "0.10.0"
3637
path = "../../../../drone-core"
3738

3839
[dependencies.drone-cortex-m]
39-
version = "0.9.0"
40+
version = "0.10.0"
4041
path = "../../../../drone-cortex-m"
4142

4243
[dependencies.drone-stm32-map-pieces]
43-
version = "=0.9.0"
44+
version = "=0.10.0"
4445
path = "../../pieces"
46+
47+
[package.metadata.docs.rs]
48+
default-target = "thumbv7em-none-eabihf"
49+
features = ["stm32l4s9"]

src/periph/dma/Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[package]
22
name = "drone-stm32-map-periph-dma"
3-
version = "0.9.0"
3+
version = "0.10.0"
44
authors = ["Valentine Valyaeff <[email protected]>"]
55
edition = "2018"
66
repository = "https://github.com/drone-os/drone-stm32-map"
7+
homepage = "https://www.drone-os.com/"
78
license = "MIT OR Apache-2.0"
89
description = """
910
STM32 peripheral mappings for Drone, an Embedded Operating System.
@@ -32,13 +33,17 @@ stm32l4s7 = ["drone-cortex-m/cortex_m4f_r0p1", "drone-stm32-map-pieces/stm32l4s7
3233
stm32l4s9 = ["drone-cortex-m/cortex_m4f_r0p1", "drone-stm32-map-pieces/stm32l4s9"]
3334

3435
[dependencies.drone-core]
35-
version = "0.9.0"
36+
version = "0.10.0"
3637
path = "../../../../drone-core"
3738

3839
[dependencies.drone-cortex-m]
39-
version = "0.9.0"
40+
version = "0.10.0"
4041
path = "../../../../drone-cortex-m"
4142

4243
[dependencies.drone-stm32-map-pieces]
43-
version = "=0.9.0"
44+
version = "=0.10.0"
4445
path = "../../pieces"
46+
47+
[package.metadata.docs.rs]
48+
default-target = "thumbv7em-none-eabihf"
49+
features = ["stm32l4s9"]

0 commit comments

Comments
 (0)