Skip to content

Commit 2bf3e5d

Browse files
bors[bot]Jonas Schievink
andauthored
Merge #377
377: Split readme and avoid most broken links r=jonas-schievink a=jonas-schievink Largely avoids #375, just the license file links are broken now. bors r+ Co-authored-by: Jonas Schievink <[email protected]>
2 parents 6b1c234 + 212b798 commit 2bf3e5d

File tree

3 files changed

+57
-53
lines changed

3 files changed

+57
-53
lines changed

README.md

Lines changed: 7 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Every nRF chip has its own crate, listed below:
1616

1717
| Crate | Docs | crates.io | target |
1818
|-------|------|-----------|--------|
19-
| [`nrf51-hal`](./nrf51-hal) | [![docs.rs](https://docs.rs/nrf51-hal/badge.svg)](https://docs.rs/nrf51-hal) | [![crates.io](https://img.shields.io/crates/d/nrf51-hal.svg)](https://crates.io/crates/nrf51-hal) | `thumbv6m-none-eabi` |
20-
| [`nrf52810-hal`](./nrf52810-hal) | [![docs.rs](https://docs.rs/nrf52810-hal/badge.svg)](https://docs.rs/nrf52810-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52810-hal.svg)](https://crates.io/crates/nrf52810-hal) | `thumbv7em-none-eabi` |
21-
| [`nrf52811-hal`](./nrf52811-hal) | [![docs.rs](https://docs.rs/nrf52811-hal/badge.svg)](https://docs.rs/nrf52811-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52811-hal.svg)](https://crates.io/crates/nrf52811-hal) | `thumbv7em-none-eabi` |
22-
| [`nrf52832-hal`](./nrf52832-hal) | [![docs.rs](https://docs.rs/nrf52832-hal/badge.svg)](https://docs.rs/nrf52832-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52832-hal.svg)](https://crates.io/crates/nrf52832-hal) | `thumbv7em-none-eabihf` |
23-
| [`nrf52833-hal`](./nrf52833-hal) | [![docs.rs](https://docs.rs/nrf52833-hal/badge.svg)](https://docs.rs/nrf52833-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52833-hal.svg)](https://crates.io/crates/nrf52833-hal) | `thumbv7em-none-eabihf` |
24-
| [`nrf52840-hal`](./nrf52840-hal) | [![docs.rs](https://docs.rs/nrf52840-hal/badge.svg)](https://docs.rs/nrf52840-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52840-hal.svg)](https://crates.io/crates/nrf52840-hal) | `thumbv7em-none-eabihf` |
25-
| [`nrf9160-hal`](./nrf9160-hal) | [![docs.rs](https://docs.rs/nrf9160-hal/badge.svg)](https://docs.rs/nrf9160-hal) | [![crates.io](https://img.shields.io/crates/d/nrf9160-hal.svg)](https://crates.io/crates/nrf9160-hal) | `thumbv8m.main-none-eabihf` |
19+
| `nrf51-hal` | [![docs.rs](https://docs.rs/nrf51-hal/badge.svg)](https://docs.rs/nrf51-hal) | [![crates.io](https://img.shields.io/crates/d/nrf51-hal.svg)](https://crates.io/crates/nrf51-hal) | `thumbv6m-none-eabi` |
20+
| `nrf52810-hal` | [![docs.rs](https://docs.rs/nrf52810-hal/badge.svg)](https://docs.rs/nrf52810-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52810-hal.svg)](https://crates.io/crates/nrf52810-hal) | `thumbv7em-none-eabi` |
21+
| `nrf52811-hal` | [![docs.rs](https://docs.rs/nrf52811-hal/badge.svg)](https://docs.rs/nrf52811-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52811-hal.svg)](https://crates.io/crates/nrf52811-hal) | `thumbv7em-none-eabi` |
22+
| `nrf52832-hal` | [![docs.rs](https://docs.rs/nrf52832-hal/badge.svg)](https://docs.rs/nrf52832-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52832-hal.svg)](https://crates.io/crates/nrf52832-hal) | `thumbv7em-none-eabihf` |
23+
| `nrf52833-hal` | [![docs.rs](https://docs.rs/nrf52833-hal/badge.svg)](https://docs.rs/nrf52833-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52833-hal.svg)](https://crates.io/crates/nrf52833-hal) | `thumbv7em-none-eabihf` |
24+
| `nrf52840-hal` | [![docs.rs](https://docs.rs/nrf52840-hal/badge.svg)](https://docs.rs/nrf52840-hal) | [![crates.io](https://img.shields.io/crates/d/nrf52840-hal.svg)](https://crates.io/crates/nrf52840-hal) | `thumbv7em-none-eabihf` |
25+
| `nrf9160-hal` | [![docs.rs](https://docs.rs/nrf9160-hal/badge.svg)](https://docs.rs/nrf9160-hal) | [![crates.io](https://img.shields.io/crates/d/nrf9160-hal.svg)](https://crates.io/crates/nrf9160-hal) | `thumbv8m.main-none-eabihf` |
2626

2727
## Device Reference Manuals from Nordic
2828

@@ -58,49 +58,3 @@ at your option.
5858
Unless you explicitly state otherwise, any contribution intentionally submitted
5959
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
6060
dual licensed as above, without any additional terms or conditions.
61-
62-
## Summary of the Examples
63-
64-
Here follows a brief description of each demo for quick reference. For a more in-depth explanation on how the peripherals work please refer to the device reference manuals linked above, the readme for each demo and the comments in the demo code itself.
65-
66-
| Demo | Category | Description |
67-
|-------------------------------------------------------|-------------------|-----------------------------------------------------------------------|
68-
| [blinky-button-demo](./examples/blinky-button-demo/README.md) | Hello World | Blinky button demo |
69-
| [ccm-demo](./examples/ccm-demo/README.md) | Encryption | Cipher block chaining - message authentication code (CCM) mode demo |
70-
| [comp-demo](./examples/comp-demo/README.md) | Analog Pins | Voltage comparator peripheral demo |
71-
| [ecb-demo](./examples/ecb-demo/README.md) | Encryption | AES electronic codebook mode encryption demo |
72-
| [gpiote-demo](./examples/gpiote-demo/README.md) | Digital Pins | General-Purpose Input Output Tasks and Events module demo |
73-
| [i2s-controller-demo](./examples/i2s-controller-demo/README.md)| Audio | Inter-IC Sound interface "controller mode (aka master mode)" demo |
74-
| [i2s-peripheral-demo](./examples/i2s-peripheral-demo/README.md)| Audio | Inter-IC Sound interface "peripheral mode (aka slave mode)" demo |
75-
| [lpcomp-demo](./examples/lpcomp-demo/README.md) | Analog Pins | Low power voltage comparator demo |
76-
| [ppi-demo](./examples/ppi-demo/README.md) | Channels | Programmable peripheral interconnect (PPI) demo |
77-
| [pwm-demo](./examples/pwm-demo/README.md) | Digital Pins | Pulse width modulation demo |
78-
| [qdec-demo](./examples/qdec-demo/README.md) | Sensor Decoding | Quadrature sensor decoder (QDEC) demo |
79-
| [rtic-demo](./examples/rtic-demo/README.md) | Framework | The Real-Time Interrupt-driven Concurrency framework demo |
80-
| [spi-demo](./examples/spi-demo/README.md) | Digital Pins | Serial peripheral interface master (SPIM) with EasyDMA demo |
81-
| [spis-demo](./examples/spis-demo/README.md) | Digital Pins | Serial peripheral interface slave (SPIS) demo |
82-
| [twi-ssd1306](./examples/twi-ssd1306/README.md) | Digital Pins | I2C compatible Two-Wire Interface with the SSD1306 OLED Display demo |
83-
| [twim-demo](./examples/twim-demo/README.md) | Digital Pins | I2C compatible Two-Wire Interface Master mode demo |
84-
| [twis-demo](./examples/twis-demo/README.md) | Digital Pins | I2C compatible Two-Wire Interface Slave mode demo |
85-
| [wdt-demo](./examples/wdt-demo/README.md) | Timer | Watchdog timer demo |
86-
87-
88-
## Running the Examples
89-
90-
Each demo readme should contain instructions on how to run it. However, the information below describes the technologies used and can be used to troubleshoot your system setup. Run the demos from within their respective project directories. E.g. to run `ccm-demo`, you must be in the `nrf-hal/examples/ccm-demo/` directory.
91-
> Since the demos are stand-alone projects you would **NOT** typically run them with `cargo run --example xyz-demo` like some cargo projects are configured to do.
92-
93-
### Once Off System Setup
94-
95-
Install the cross compilation toolchain to target your device. You would typically pass the target as a parameter to cargo or explicitly set it in your cargo config file. If you get compilation errors about `eh_personality` then you have not set the target correctly. Here is an example of the target for a nRF52840 chip:
96-
```console
97-
$ rustup target add thumbv7em-none-eabihf
98-
```
99-
Install the tools to flash the device.
100-
```console
101-
$ cargo install cargo-embed
102-
```
103-
104-
### For Every Project (optional)
105-
106-
Setup the `Cargo.toml` file to use the correct features. Features allow for conditional compilation which is essential for a library like this that supports multiple different devices. Under the `[features]` section add the following line `default = ["52840"]` for the nRF52840-DK device or whatever other feature is applicable for your device. This is optional but it will allow you to simply call `cargo run` and `cargo build` instead of `cargo run --features 52840` and `cargo build --features 52840` respectively. Note that some demo projects do not have features so this step may not be necessary. If you get a whole bunch of compilation errors or plugins like rust-analyzer are not working then check that you have set the chip features correctly.

examples/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
## Summary of the Examples
3+
4+
Here follows a brief description of each demo for quick reference. For a more in-depth explanation on how the peripherals work please refer to the device reference manuals linked above, the readme for each demo and the comments in the demo code itself.
5+
6+
| Demo | Category | Description |
7+
|-------------------------------------------------------|-------------------|-----------------------------------------------------------------------|
8+
| [blinky-button-demo](./blinky-button-demo/README.md) | Hello World | Blinky button demo |
9+
| [ccm-demo](./ccm-demo/README.md) | Encryption | Cipher block chaining - message authentication code (CCM) mode demo |
10+
| [comp-demo](./comp-demo/README.md) | Analog Pins | Voltage comparator peripheral demo |
11+
| [ecb-demo](./ecb-demo/README.md) | Encryption | AES electronic codebook mode encryption demo |
12+
| [gpiote-demo](./gpiote-demo/README.md) | Digital Pins | General-Purpose Input Output Tasks and Events module demo |
13+
| [i2s-controller-demo](./i2s-controller-demo/README.md)| Audio | Inter-IC Sound interface "controller mode (aka master mode)" demo |
14+
| [i2s-peripheral-demo](./i2s-peripheral-demo/README.md)| Audio | Inter-IC Sound interface "peripheral mode (aka slave mode)" demo |
15+
| [lpcomp-demo](./lpcomp-demo/README.md) | Analog Pins | Low power voltage comparator demo |
16+
| [ppi-demo](./ppi-demo/README.md) | Channels | Programmable peripheral interconnect (PPI) demo |
17+
| [pwm-demo](./pwm-demo/README.md) | Digital Pins | Pulse width modulation demo |
18+
| [qdec-demo](./qdec-demo/README.md) | Sensor Decoding | Quadrature sensor decoder (QDEC) demo |
19+
| [rtic-demo](./rtic-demo/README.md) | Framework | The Real-Time Interrupt-driven Concurrency framework demo |
20+
| [spi-demo](./spi-demo/README.md) | Digital Pins | Serial peripheral interface master (SPIM) with EasyDMA demo |
21+
| [spis-demo](./spis-demo/README.md) | Digital Pins | Serial peripheral interface slave (SPIS) demo |
22+
| [twi-ssd1306](./twi-ssd1306/README.md) | Digital Pins | I2C compatible Two-Wire Interface with the SSD1306 OLED Display demo |
23+
| [twim-demo](./twim-demo/README.md) | Digital Pins | I2C compatible Two-Wire Interface Master mode demo |
24+
| [twis-demo](./twis-demo/README.md) | Digital Pins | I2C compatible Two-Wire Interface Slave mode demo |
25+
| [wdt-demo](./wdt-demo/README.md) | Timer | Watchdog timer demo |
26+
27+
28+
## Running the Examples
29+
30+
Each demo readme should contain instructions on how to run it. However, the information below describes the technologies used and can be used to troubleshoot your system setup. Run the demos from within their respective project directories. E.g. to run `ccm-demo`, you must be in the `nrf-hal/examples/ccm-demo/` directory.
31+
> Since the demos are stand-alone projects you would **NOT** typically run them with `cargo run --example xyz-demo` like some cargo projects are configured to do.
32+
33+
### Once Off System Setup
34+
35+
Install the cross compilation toolchain to target your device. You would typically pass the target as a parameter to cargo or explicitly set it in your cargo config file. If you get compilation errors about `eh_personality` then you have not set the target correctly. Here is an example of the target for a nRF52840 chip:
36+
```console
37+
$ rustup target add thumbv7em-none-eabihf
38+
```
39+
Install the tools to flash the device.
40+
```console
41+
$ cargo install cargo-embed
42+
```
43+
44+
### For Every Project (optional)
45+
46+
Setup the `Cargo.toml` file to use the correct features. Features allow for conditional compilation which is essential for a library like this that supports multiple different devices. Under the `[features]` section add the following line `default = ["52840"]` for the nRF52840-DK device or whatever other feature is applicable for your device. This is optional but it will allow you to simply call `cargo run` and `cargo build` instead of `cargo run --features 52840` and `cargo build --features 52840` respectively. Note that some demo projects do not have features so this step may not be necessary. If you get a whole bunch of compilation errors or plugins like rust-analyzer are not working then check that you have set the chip features correctly.

xtask/tests/ci.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ fn main() {
9191
continue;
9292
}
9393

94+
if entry.metadata().unwrap().is_file() {
95+
continue;
96+
}
97+
9498
if EXAMPLES
9599
.iter()
96100
.find(|(example, ..)| *example == name)

0 commit comments

Comments
 (0)