Skip to content

Commit 10e5711

Browse files
committed
Amend manifest
1 parent e9bf6cf commit 10e5711

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
authors = ["Jalon Wong <[email protected]>"]
33
categories = ["embedded", "hardware-support", "no-std"]
44
description = "HAL for the STM32F1 family"
5+
documentation = "https://docs.rs/stm32f1-hal"
56
edition = "2024"
67
keywords = ["arm", "cortex-m", "stm32", "hal"]
78
license = "MIT OR Apache-2.0"
8-
name = "jw-stm32f1-hal"
9+
name = "stm32f1-hal"
910
readme = "README.md"
10-
version = "0.1.0"
11+
repository = "https://github.com/jw-mcu-rust/stm32f1-hal"
12+
version = "0.0.1"
1113

1214
[features]
1315
critical-section-single-core = ["cortex-m/critical-section-single-core"]

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
# jw-stm32f1-hal
1+
# stm32f1-hal
22
Because the design of [stm32f1xx-hal](https://github.com/stm32-rs/stm32f1xx-hal) is unsuitable for my needs and [stm32-hal](https://github.com/David-OConnor/stm32-hal) doesn't support the F1 series, I decided to write a new crate.
33

44
Many codes come from [stm32f1xx-hal](https://github.com/stm32-rs/stm32f1xx-hal).
5+
6+
## Design
7+
Below are the design principles.
8+
1. Readability is the most important.
9+
- We only write code a few times, but we read it countless times. Moreover, understanding the code is a necessary condition for maintaining it.
10+
2. Conciseness does not equal simplicity.
11+
- Fewer lines of code mean conciseness, but being easy to understand is simplicity.
12+
13+
Therefore, if a module is quite complex, I would not use a macro + generic approach, as it is too difficult to read.
14+
15+
Instead, I use a script to generate code for GPIO alternate function remapping and a synchronization script to manage duplicate code across peripherals.

0 commit comments

Comments
 (0)