From 67aff3c22cb60f743201672db6a65fdec5da4678 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 4 Oct 2020 16:22:04 +0200 Subject: [PATCH] README: Remove text about custom patching We're now fully compatible with upstream svdtools so the additional documentation is superfluous. Remove it and point to the up-to-date svdtools documentation instead. Signed-off-by: Rahix --- README.md | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/README.md b/README.md index 0a4192e..a71f990 100644 --- a/README.md +++ b/README.md @@ -59,30 +59,7 @@ cargo +nightly doc --features --open ### Adding a new Chip To add a new chip, download the *atdf* from and place it in `vendor/`. Be sure to name it like the Rust module that should be generated. Next, you need to integrate it into the base crate and build system. Follow what was done in commit [290613454fbd ("Add basic support for ATmega64")](https://github.com/Rahix/avr-device/commit/290613454fbdc5e4ac98e53deccaf74dafc88963). Please adhere to the alphabetical sorting that is present so far. -If patches need to be applied, create a `.yaml` in `patch/`. The patching format is compatible to the [YAML patching format of stm32](https://github.com/stm32-rs/stm32-rs/#device-and-peripheral-yaml-format), except that you do not need to provide the path to the svd file (`_svd: ...`) since it is generated in the build process. Additionally, the following patching was added: -```yaml -PERIPHERIAL: - REGISTER: - _modify: - FIELD: - # If a field already contains a write-constraint, you can - # change it using the _write_constraint modifier. The - # following values are allowed: - - # "enum": Only allow enumerated values () - _write_constraint: "enum" - - # Remove any existing writeConstraint tag - _write_constraint: "none" - - # Constrain to a range of values () - _write_constraint: [min, max] - FIELD: - # Replaces the enumeratedValues definition for this field. - # If it does not exist yet, it is created. - _replace_enum: - NAME: [VALUE, DESCRIPTION] -``` +If patches need to be applied, create a `.yaml` in `patch/`. The patching format is documented in the [`svdtools` README](https://github.com/stm32-rs/svdtools#device-and-peripheral-yaml-format). Ideally, try to reuse the exisiting patches in `patch/common/` or `patch/timer/`. ## License *avr-device* is licensed under either of -- 2.49.0