From 0a44427fda2b9d18be796a55941a7eefe010cc50 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 26 Jul 2020 11:14:28 +0200 Subject: [PATCH] Update README in preparation for release Signed-off-by: Rahix --- README.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 9834349..69ed69a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,26 @@ avr-device [![Build Status](https://travis-ci.org/Rahix/avr-device.svg?branch=master)](https://travis-ci.org/Rahix/avr-device) ========== -Auto-generated wrappers around registers for avr chips. +Auto-generated wrappers around registers for AVR microcontrollers. ## Usage +Add the following to `Cargo.toml`: +```toml +[dependencies.avr-device] +version = "0.1.0" +features = ["atmega32u4"] +``` + +Via the feature you can select which chip you want the register specifications for. The following list is what is currently supported: +* `atmega1280` +* `atmega8` +* `atmega328p` +* `atmega32u4` +* `atmega64` +* `attiny85` + +## Build Instructions +The version on `crates.io` is pre-built. The following is only necessary when trying to build this crate from source. + You need to have [atdf2svd](https://github.com/Rahix/atdf2svd), [svd2rust](https://github.com/rust-embedded/svd2rust), [form](https://github.com/djmcgill/form), [rustfmt](https://github.com/rust-lang/rustfmt)(for the *nightly* toolchain) and [PyYAML](https://github.com/yaml/pyyaml) installed: ```bash rustup component add --toolchain nightly rustfmt @@ -23,21 +41,6 @@ make cargo +nightly doc --features --open ``` -In your project add the following lines to `Cargo.toml`: -```toml -[dependencies.avr-device] -path = "path/to/avr-device/" -features = ["atmega32u4"] -``` - -Via the feature you can select which chip you want the register specifications for. The following list is what is currently supported: -* `atmega1280` -* `atmega8` -* `atmega328p` -* `atmega32u4` -* `atmega64` -* `attiny85` - ## Internals *avr-device* is generated using [`atdf2svd`](https://github.com/Rahix/atdf2svd) and [`svd2rust`](https://github.com/rust-embedded/svd2rust). The vendor-provided *atdf* files can be found in `vendor/`. The intermediate svd files are patched by `svdpatch.py` (Adapted from [`svdpatch.py`](https://github.com/stm32-rs/stm32-rs/blob/master/scripts/svdpatch.py) in [stm32-rs](https://github.com/stm32-rs/stm32-rs)) with device-dependent patches in `patch/`, mainly to improve undescriptive names and missing descriptions. -- 2.48.1