From 949b4fdc5ec02659f4b1fdf2fd9b13d72e89ee97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rom=C3=A1n=20C=C3=A1rdenas=20Rodr=C3=ADguez?= Date: Wed, 11 Sep 2024 08:59:40 +0200 Subject: [PATCH] prepare for Cargo Workspace --- .github/bors.toml | 10 ----- .github/workflows/changelog.yaml | 29 +++++++++++++ .github/workflows/ci.yaml | 57 -------------------------- .github/workflows/e310x.yaml | 55 +++++++++++++++++++++++++ .github/workflows/rustfmt.yaml | 20 +++------ Cargo.toml | 27 +++--------- README.md | 40 ++++-------------- CHANGELOG.md => e310x/CHANGELOG.md | 0 e310x/Cargo.toml | 22 ++++++++++ e310x/README.md | 44 ++++++++++++++++++++ build.rs => e310x/build.rs | 0 device.x => e310x/device.x | 0 e310x.svd => e310x/e310x.svd | 0 memory.x => e310x/memory.x | 0 {src => e310x/src}/aonclk.rs | 0 {src => e310x/src}/aonclk/lfrosccfg.rs | 0 {src => e310x/src}/backup.rs | 0 {src => e310x/src}/backup/backup.rs | 0 {src => e310x/src}/clint.rs | 0 {src => e310x/src}/clint/msip.rs | 0 {src => e310x/src}/clint/mtime.rs | 0 {src => e310x/src}/clint/mtimecmp.rs | 0 {src => e310x/src}/clint/mtimecmph.rs | 0 {src => e310x/src}/clint/mtimeh.rs | 0 {src => e310x/src}/generic.rs | 0 {src => e310x/src}/gpio0.rs | 0 {src => e310x/src}/gpio0/drive.rs | 0 {src => e310x/src}/gpio0/fall_ie.rs | 0 {src => e310x/src}/gpio0/fall_ip.rs | 0 {src => e310x/src}/gpio0/high_ie.rs | 0 {src => e310x/src}/gpio0/high_ip.rs | 0 {src => e310x/src}/gpio0/input_en.rs | 0 {src => e310x/src}/gpio0/input_val.rs | 0 {src => e310x/src}/gpio0/iof_en.rs | 0 {src => e310x/src}/gpio0/iof_sel.rs | 0 {src => e310x/src}/gpio0/low_ie.rs | 0 {src => e310x/src}/gpio0/low_ip.rs | 0 {src => e310x/src}/gpio0/out_xor.rs | 0 {src => e310x/src}/gpio0/output_en.rs | 0 {src => e310x/src}/gpio0/output_val.rs | 0 {src => e310x/src}/gpio0/pullup.rs | 0 {src => e310x/src}/gpio0/rise_ie.rs | 0 {src => e310x/src}/gpio0/rise_ip.rs | 0 {src => e310x/src}/i2c0.rs | 0 {src => e310x/src}/i2c0/cr.rs | 0 {src => e310x/src}/i2c0/cr_sr.rs | 0 {src => e310x/src}/i2c0/ctr.rs | 0 {src => e310x/src}/i2c0/prer_hi.rs | 0 {src => e310x/src}/i2c0/prer_lo.rs | 0 {src => e310x/src}/i2c0/sr.rs | 0 {src => e310x/src}/i2c0/txr_rxr.rs | 0 {src => e310x/src}/interrupt.rs | 0 {src => e310x/src}/lib.rs | 0 {src => e310x/src}/otp.rs | 0 {src => e310x/src}/otp/addr.rs | 0 {src => e310x/src}/otp/clock.rs | 0 {src => e310x/src}/otp/data_in.rs | 0 {src => e310x/src}/otp/data_out.rs | 0 {src => e310x/src}/otp/lock.rs | 0 {src => e310x/src}/otp/mode.rs | 0 {src => e310x/src}/otp/mpp.rs | 0 {src => e310x/src}/otp/mrr.rs | 0 {src => e310x/src}/otp/output_en.rs | 0 {src => e310x/src}/otp/rsctrl.rs | 0 {src => e310x/src}/otp/select.rs | 0 {src => e310x/src}/otp/vppen.rs | 0 {src => e310x/src}/otp/vrren.rs | 0 {src => e310x/src}/otp/write_en.rs | 0 {src => e310x/src}/plic.rs | 0 {src => e310x/src}/plic/claim.rs | 0 {src => e310x/src}/plic/enable.rs | 0 {src => e310x/src}/plic/pending.rs | 0 {src => e310x/src}/plic/priority.rs | 0 {src => e310x/src}/plic/threshold.rs | 0 {src => e310x/src}/pmu.rs | 0 {src => e310x/src}/pmu/pmucause.rs | 0 {src => e310x/src}/pmu/pmuie.rs | 0 {src => e310x/src}/pmu/pmukey.rs | 0 {src => e310x/src}/pmu/pmusleep.rs | 0 {src => e310x/src}/pmu/pmusleeppm.rs | 0 {src => e310x/src}/pmu/pmuwakepm.rs | 0 {src => e310x/src}/prci.rs | 0 {src => e310x/src}/prci/coreclkcfg.rs | 0 {src => e310x/src}/prci/hfrosccfg.rs | 0 {src => e310x/src}/prci/hfxosccfg.rs | 0 {src => e310x/src}/prci/pllcfg.rs | 0 {src => e310x/src}/prci/plloutdiv.rs | 0 {src => e310x/src}/pwm0.rs | 0 {src => e310x/src}/pwm0/cfg.rs | 0 {src => e310x/src}/pwm0/cmp0.rs | 0 {src => e310x/src}/pwm0/cmp1.rs | 0 {src => e310x/src}/pwm0/cmp2.rs | 0 {src => e310x/src}/pwm0/cmp3.rs | 0 {src => e310x/src}/pwm0/count.rs | 0 {src => e310x/src}/pwm0/pwms.rs | 0 {src => e310x/src}/qspi0.rs | 0 {src => e310x/src}/qspi0/csdef.rs | 0 {src => e310x/src}/qspi0/csid.rs | 0 {src => e310x/src}/qspi0/csmode.rs | 0 {src => e310x/src}/qspi0/delay0.rs | 0 {src => e310x/src}/qspi0/delay1.rs | 0 {src => e310x/src}/qspi0/fctrl.rs | 0 {src => e310x/src}/qspi0/ffmt.rs | 0 {src => e310x/src}/qspi0/fmt.rs | 0 {src => e310x/src}/qspi0/ie.rs | 0 {src => e310x/src}/qspi0/ip.rs | 0 {src => e310x/src}/qspi0/rxdata.rs | 0 {src => e310x/src}/qspi0/rxmark.rs | 0 {src => e310x/src}/qspi0/sckdiv.rs | 0 {src => e310x/src}/qspi0/sckmode.rs | 0 {src => e310x/src}/qspi0/txdata.rs | 0 {src => e310x/src}/qspi0/txmark.rs | 0 {src => e310x/src}/rtc.rs | 0 {src => e310x/src}/rtc/rtccfg.rs | 0 {src => e310x/src}/rtc/rtccmp.rs | 0 {src => e310x/src}/rtc/rtchi.rs | 0 {src => e310x/src}/rtc/rtclo.rs | 0 {src => e310x/src}/rtc/rtcs.rs | 0 {src => e310x/src}/uart0.rs | 0 {src => e310x/src}/uart0/div.rs | 0 {src => e310x/src}/uart0/ie.rs | 0 {src => e310x/src}/uart0/ip.rs | 0 {src => e310x/src}/uart0/rxctrl.rs | 0 {src => e310x/src}/uart0/rxdata.rs | 0 {src => e310x/src}/uart0/txctrl.rs | 0 {src => e310x/src}/uart0/txdata.rs | 0 {src => e310x/src}/wdog.rs | 0 {src => e310x/src}/wdog/wdogcfg.rs | 0 {src => e310x/src}/wdog/wdogcmp.rs | 0 {src => e310x/src}/wdog/wdogcount.rs | 0 {src => e310x/src}/wdog/wdogfeed.rs | 0 {src => e310x/src}/wdog/wdogkey.rs | 0 {src => e310x/src}/wdog/wdogs.rs | 0 update.sh => e310x/update.sh | 0 134 files changed, 170 insertions(+), 134 deletions(-) delete mode 100644 .github/bors.toml create mode 100644 .github/workflows/changelog.yaml delete mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/e310x.yaml rename CHANGELOG.md => e310x/CHANGELOG.md (100%) create mode 100644 e310x/Cargo.toml create mode 100644 e310x/README.md rename build.rs => e310x/build.rs (100%) rename device.x => e310x/device.x (100%) rename e310x.svd => e310x/e310x.svd (100%) rename memory.x => e310x/memory.x (100%) rename {src => e310x/src}/aonclk.rs (100%) rename {src => e310x/src}/aonclk/lfrosccfg.rs (100%) rename {src => e310x/src}/backup.rs (100%) rename {src => e310x/src}/backup/backup.rs (100%) rename {src => e310x/src}/clint.rs (100%) rename {src => e310x/src}/clint/msip.rs (100%) rename {src => e310x/src}/clint/mtime.rs (100%) rename {src => e310x/src}/clint/mtimecmp.rs (100%) rename {src => e310x/src}/clint/mtimecmph.rs (100%) rename {src => e310x/src}/clint/mtimeh.rs (100%) rename {src => e310x/src}/generic.rs (100%) rename {src => e310x/src}/gpio0.rs (100%) rename {src => e310x/src}/gpio0/drive.rs (100%) rename {src => e310x/src}/gpio0/fall_ie.rs (100%) rename {src => e310x/src}/gpio0/fall_ip.rs (100%) rename {src => e310x/src}/gpio0/high_ie.rs (100%) rename {src => e310x/src}/gpio0/high_ip.rs (100%) rename {src => e310x/src}/gpio0/input_en.rs (100%) rename {src => e310x/src}/gpio0/input_val.rs (100%) rename {src => e310x/src}/gpio0/iof_en.rs (100%) rename {src => e310x/src}/gpio0/iof_sel.rs (100%) rename {src => e310x/src}/gpio0/low_ie.rs (100%) rename {src => e310x/src}/gpio0/low_ip.rs (100%) rename {src => e310x/src}/gpio0/out_xor.rs (100%) rename {src => e310x/src}/gpio0/output_en.rs (100%) rename {src => e310x/src}/gpio0/output_val.rs (100%) rename {src => e310x/src}/gpio0/pullup.rs (100%) rename {src => e310x/src}/gpio0/rise_ie.rs (100%) rename {src => e310x/src}/gpio0/rise_ip.rs (100%) rename {src => e310x/src}/i2c0.rs (100%) rename {src => e310x/src}/i2c0/cr.rs (100%) rename {src => e310x/src}/i2c0/cr_sr.rs (100%) rename {src => e310x/src}/i2c0/ctr.rs (100%) rename {src => e310x/src}/i2c0/prer_hi.rs (100%) rename {src => e310x/src}/i2c0/prer_lo.rs (100%) rename {src => e310x/src}/i2c0/sr.rs (100%) rename {src => e310x/src}/i2c0/txr_rxr.rs (100%) rename {src => e310x/src}/interrupt.rs (100%) rename {src => e310x/src}/lib.rs (100%) rename {src => e310x/src}/otp.rs (100%) rename {src => e310x/src}/otp/addr.rs (100%) rename {src => e310x/src}/otp/clock.rs (100%) rename {src => e310x/src}/otp/data_in.rs (100%) rename {src => e310x/src}/otp/data_out.rs (100%) rename {src => e310x/src}/otp/lock.rs (100%) rename {src => e310x/src}/otp/mode.rs (100%) rename {src => e310x/src}/otp/mpp.rs (100%) rename {src => e310x/src}/otp/mrr.rs (100%) rename {src => e310x/src}/otp/output_en.rs (100%) rename {src => e310x/src}/otp/rsctrl.rs (100%) rename {src => e310x/src}/otp/select.rs (100%) rename {src => e310x/src}/otp/vppen.rs (100%) rename {src => e310x/src}/otp/vrren.rs (100%) rename {src => e310x/src}/otp/write_en.rs (100%) rename {src => e310x/src}/plic.rs (100%) rename {src => e310x/src}/plic/claim.rs (100%) rename {src => e310x/src}/plic/enable.rs (100%) rename {src => e310x/src}/plic/pending.rs (100%) rename {src => e310x/src}/plic/priority.rs (100%) rename {src => e310x/src}/plic/threshold.rs (100%) rename {src => e310x/src}/pmu.rs (100%) rename {src => e310x/src}/pmu/pmucause.rs (100%) rename {src => e310x/src}/pmu/pmuie.rs (100%) rename {src => e310x/src}/pmu/pmukey.rs (100%) rename {src => e310x/src}/pmu/pmusleep.rs (100%) rename {src => e310x/src}/pmu/pmusleeppm.rs (100%) rename {src => e310x/src}/pmu/pmuwakepm.rs (100%) rename {src => e310x/src}/prci.rs (100%) rename {src => e310x/src}/prci/coreclkcfg.rs (100%) rename {src => e310x/src}/prci/hfrosccfg.rs (100%) rename {src => e310x/src}/prci/hfxosccfg.rs (100%) rename {src => e310x/src}/prci/pllcfg.rs (100%) rename {src => e310x/src}/prci/plloutdiv.rs (100%) rename {src => e310x/src}/pwm0.rs (100%) rename {src => e310x/src}/pwm0/cfg.rs (100%) rename {src => e310x/src}/pwm0/cmp0.rs (100%) rename {src => e310x/src}/pwm0/cmp1.rs (100%) rename {src => e310x/src}/pwm0/cmp2.rs (100%) rename {src => e310x/src}/pwm0/cmp3.rs (100%) rename {src => e310x/src}/pwm0/count.rs (100%) rename {src => e310x/src}/pwm0/pwms.rs (100%) rename {src => e310x/src}/qspi0.rs (100%) rename {src => e310x/src}/qspi0/csdef.rs (100%) rename {src => e310x/src}/qspi0/csid.rs (100%) rename {src => e310x/src}/qspi0/csmode.rs (100%) rename {src => e310x/src}/qspi0/delay0.rs (100%) rename {src => e310x/src}/qspi0/delay1.rs (100%) rename {src => e310x/src}/qspi0/fctrl.rs (100%) rename {src => e310x/src}/qspi0/ffmt.rs (100%) rename {src => e310x/src}/qspi0/fmt.rs (100%) rename {src => e310x/src}/qspi0/ie.rs (100%) rename {src => e310x/src}/qspi0/ip.rs (100%) rename {src => e310x/src}/qspi0/rxdata.rs (100%) rename {src => e310x/src}/qspi0/rxmark.rs (100%) rename {src => e310x/src}/qspi0/sckdiv.rs (100%) rename {src => e310x/src}/qspi0/sckmode.rs (100%) rename {src => e310x/src}/qspi0/txdata.rs (100%) rename {src => e310x/src}/qspi0/txmark.rs (100%) rename {src => e310x/src}/rtc.rs (100%) rename {src => e310x/src}/rtc/rtccfg.rs (100%) rename {src => e310x/src}/rtc/rtccmp.rs (100%) rename {src => e310x/src}/rtc/rtchi.rs (100%) rename {src => e310x/src}/rtc/rtclo.rs (100%) rename {src => e310x/src}/rtc/rtcs.rs (100%) rename {src => e310x/src}/uart0.rs (100%) rename {src => e310x/src}/uart0/div.rs (100%) rename {src => e310x/src}/uart0/ie.rs (100%) rename {src => e310x/src}/uart0/ip.rs (100%) rename {src => e310x/src}/uart0/rxctrl.rs (100%) rename {src => e310x/src}/uart0/rxdata.rs (100%) rename {src => e310x/src}/uart0/txctrl.rs (100%) rename {src => e310x/src}/uart0/txdata.rs (100%) rename {src => e310x/src}/wdog.rs (100%) rename {src => e310x/src}/wdog/wdogcfg.rs (100%) rename {src => e310x/src}/wdog/wdogcmp.rs (100%) rename {src => e310x/src}/wdog/wdogcount.rs (100%) rename {src => e310x/src}/wdog/wdogfeed.rs (100%) rename {src => e310x/src}/wdog/wdogkey.rs (100%) rename {src => e310x/src}/wdog/wdogs.rs (100%) rename update.sh => e310x/update.sh (100%) diff --git a/.github/bors.toml b/.github/bors.toml deleted file mode 100644 index b5b4935..0000000 --- a/.github/bors.toml +++ /dev/null @@ -1,10 +0,0 @@ -block_labels = ["needs-decision"] -delete_merged_branches = true -required_approvals = 1 -status = [ - "ci-linux (stable)", - "ci-linux (1.42.0)", - "build-other (macOS-latest)", - "build-other (windows-latest)", - "Rustfmt" -] diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000..ddc52ad --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -0,0 +1,29 @@ +name: Changelog check + +on: + merge_group: + pull_request: + types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] + +jobs: + changelog-check: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check which component is modified + uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + e310x: + - 'e310x/**' + + - name: Check for CHANGELOG.md (e310x) + if: steps.changes.outputs['e310x'] == 'true' + uses: dangoslen/changelog-enforcer@v3 + with: + changeLogPath: ./e310x/CHANGELOG.md + skipLabels: 'skip changelog' + missingUpdateErrorMessage: 'Please add a changelog entry in the e310x/CHANGELOG.md file.' diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 0db41bb..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,57 +0,0 @@ -on: - push: - branches: [ staging, trying, master ] - pull_request: - -name: Continuous integration - -jobs: - ci-linux: - runs-on: ubuntu-20.04 - continue-on-error: ${{ matrix.experimental || false }} - strategy: - matrix: - # All generated code should be running on stable now, MRSV is 1.65.0 - rust: [nightly, stable, 1.65.0] - - include: - # Nightly is only for reference and allowed to fail - - rust: nightly - experimental: true - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true - - name: Install Rust targets - run: rustup target install --toolchain=${{ matrix.rust }} riscv32imac-unknown-none-elf - - name: Build crate for riscv32imac-unknown-none-elf - run: | - cargo build --target riscv32imac-unknown-none-elf - cargo build --target riscv32imac-unknown-none-elf --features g002 - - # On macOS and Windows, we at least make sure that the crate builds and links. - build-other: - strategy: - matrix: - os: - - macOS-latest - - windows-latest - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - name: Install Rust targets - run: rustup target install riscv32imac-unknown-none-elf - - name: Build crate for riscv32imac-unknown-none-elf - run: | - cargo build --target riscv32imac-unknown-none-elf - cargo build --target riscv32imac-unknown-none-elf --features g002 diff --git a/.github/workflows/e310x.yaml b/.github/workflows/e310x.yaml new file mode 100644 index 0000000..fc12655 --- /dev/null +++ b/.github/workflows/e310x.yaml @@ -0,0 +1,55 @@ +on: + push: + branches: [ master, cargo-workspace ] # TODO leave only master + pull_request: + +name: Build check (e310x) + +jobs: + # We check that the crate builds and links for all the toolchains and targets. + build-riscv: + strategy: + matrix: + # All generated code should be running on stable now, MRSV is 1.65.0 + toolchain: [ stable, nightly, 1.65.0 ] + target: + - riscv32imc-unknown-none-elf + - riscv32imac-unknown-none-elf # TODO e310x is not a purely IMAC core + include: + # Nightly is only for reference and allowed to fail + - toolchain: nightly + experimental: true + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || false }} + steps: + - uses: actions/checkout@v4 + - name: Update Rust toolchain + run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - name: Install Rust target + run: rustup target install ${{ matrix.target }} + - name: Build (no features) + run: cargo build --package e310x --target ${{ matrix.target }} + - name: Build (all features) + run: cargo build --package e310x --target ${{ matrix.target }} --all-features + + + # On MacOS, Ubuntu, and Windows, we at least make sure that the crate builds and links. + build-others: + strategy: + matrix: + os: [ macos-latest, ubuntu-latest, windows-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Update Rust toolchain + run: rustup update stable && rustup default stable + - name: Build (no features) + run: cargo test --package e310x + - name: Run tests (all features) + run: cargo test --package e310x --all-features + \ No newline at end of file diff --git a/.github/workflows/rustfmt.yaml b/.github/workflows/rustfmt.yaml index 0727384..8bf2b3e 100644 --- a/.github/workflows/rustfmt.yaml +++ b/.github/workflows/rustfmt.yaml @@ -1,24 +1,16 @@ - on: push: - branches: [ staging, trying, master ] + branches: [ master, cargo-workspace ] # TODO leave only master pull_request: + merge_group: name: Code formatting check jobs: fmt: name: Rustfmt - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check \ No newline at end of file + - uses: actions/checkout@v4 + - run: rustup update stable && rustup default stable + - run: cargo fmt --all -- --check --verbose diff --git a/Cargo.toml b/Cargo.toml index 6a97ead..0a4be38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,22 +1,5 @@ -[package] -name = "e310x" -version = "0.11.0" -repository = "https://github.com/riscv-rust/e310x" -authors = ["David Craven ", "The RISC-V Team "] -categories = ["embedded", "hardware-support", "no-std"] -description = "With svd2rust generated peripherals for Freedom E310 MCU's." -keywords = ["riscv", "register", "peripheral"] -license = "ISC" -rust-version = "1.59" -edition = "2021" - -[dependencies] -critical-section = { version = "1.1.3", optional = true } -vcell = "0.1.3" - -[features] -rt = [] -g002 = [] - -[package.metadata.docs.rs] -features = ["rt", "g002", "critical-section"] +[workspace] +resolver = "2" +members = [ + "e310x", +] diff --git a/README.md b/README.md index 9a7a380..d6ff951 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,16 @@ -[![crates.io](https://img.shields.io/crates/d/e310x.svg)](https://crates.io/crates/e310x) -[![crates.io](https://img.shields.io/crates/v/e310x.svg)](https://crates.io/crates/e310x) -[![Build Status](https://travis-ci.org/riscv-rust/e310x.svg?branch=master)](https://travis-ci.org/riscv-rust/e310x) +# E301x crates -# `e310x` +This repository contains various crates useful for writing Rust programs on E310x microcontrollers: -> With svd2rust generated peripherals for Freedom E310 MCU's. +* [`e310x`]: Peripheral Access Crate (PAC) for E310x chips. This project is developed and maintained by the [RISC-V team][team]. -## [Documentation](https://docs.rs/crate/e310x) +### Contribution -## Minimum Supported Rust Version (MSRV) - -This crate is guaranteed to compile on stable Rust 1.65.0 and up. It *might* -compile with older versions but that may change in any new patch release. - -## Requirements - -Install [form](https://crates.io/crates/form) and [svd2rust](https://crates.io/crates/svd2rust) using cargo install - -## License - -Copyright 2018-2023 [RISC-V team][team] - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the +work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any +additional terms or conditions. ## Code of Conduct @@ -41,5 +18,6 @@ Contribution to this crate is organized under the terms of the [Rust Code of Conduct][CoC], the maintainer of this crate, the [RISC-V team][team], promises to intervene to uphold that code of conduct. -[CoC]: CODE_OF_CONDUCT.md +[`riscv`]: https://crates.io/crates/e310x [team]: https://github.com/rust-embedded/wg#the-risc-v-team +[CoC]: CODE_OF_CONDUCT.md diff --git a/CHANGELOG.md b/e310x/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to e310x/CHANGELOG.md diff --git a/e310x/Cargo.toml b/e310x/Cargo.toml new file mode 100644 index 0000000..6a97ead --- /dev/null +++ b/e310x/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "e310x" +version = "0.11.0" +repository = "https://github.com/riscv-rust/e310x" +authors = ["David Craven ", "The RISC-V Team "] +categories = ["embedded", "hardware-support", "no-std"] +description = "With svd2rust generated peripherals for Freedom E310 MCU's." +keywords = ["riscv", "register", "peripheral"] +license = "ISC" +rust-version = "1.59" +edition = "2021" + +[dependencies] +critical-section = { version = "1.1.3", optional = true } +vcell = "0.1.3" + +[features] +rt = [] +g002 = [] + +[package.metadata.docs.rs] +features = ["rt", "g002", "critical-section"] diff --git a/e310x/README.md b/e310x/README.md new file mode 100644 index 0000000..e8a2a96 --- /dev/null +++ b/e310x/README.md @@ -0,0 +1,44 @@ +[![crates.io](https://img.shields.io/crates/d/e310x.svg)](https://crates.io/crates/e310x) +[![crates.io](https://img.shields.io/crates/v/e310x.svg)](https://crates.io/crates/e310x) + +# `e310x` + +> With svd2rust generated peripherals for Freedom E310 MCU's. + +This project is developed and maintained by the [RISC-V team][team]. + +## [Documentation](https://docs.rs/crate/e310x) + +## Minimum Supported Rust Version (MSRV) + +This crate is guaranteed to compile on stable Rust 1.65.0 and up. It *might* +compile with older versions but that may change in any new patch release. + +## Requirements + +Install [form](https://crates.io/crates/form) and [svd2rust](https://crates.io/crates/svd2rust) using cargo install + +## License + +Copyright 2018-2023 [RISC-V team][team] + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +## Code of Conduct + +Contribution to this crate is organized under the terms of the [Rust Code of +Conduct][CoC], the maintainer of this crate, the [RISC-V team][team], promises +to intervene to uphold that code of conduct. + +[CoC]: CODE_OF_CONDUCT.md +[team]: https://github.com/rust-embedded/wg#the-risc-v-team diff --git a/build.rs b/e310x/build.rs similarity index 100% rename from build.rs rename to e310x/build.rs diff --git a/device.x b/e310x/device.x similarity index 100% rename from device.x rename to e310x/device.x diff --git a/e310x.svd b/e310x/e310x.svd similarity index 100% rename from e310x.svd rename to e310x/e310x.svd diff --git a/memory.x b/e310x/memory.x similarity index 100% rename from memory.x rename to e310x/memory.x diff --git a/src/aonclk.rs b/e310x/src/aonclk.rs similarity index 100% rename from src/aonclk.rs rename to e310x/src/aonclk.rs diff --git a/src/aonclk/lfrosccfg.rs b/e310x/src/aonclk/lfrosccfg.rs similarity index 100% rename from src/aonclk/lfrosccfg.rs rename to e310x/src/aonclk/lfrosccfg.rs diff --git a/src/backup.rs b/e310x/src/backup.rs similarity index 100% rename from src/backup.rs rename to e310x/src/backup.rs diff --git a/src/backup/backup.rs b/e310x/src/backup/backup.rs similarity index 100% rename from src/backup/backup.rs rename to e310x/src/backup/backup.rs diff --git a/src/clint.rs b/e310x/src/clint.rs similarity index 100% rename from src/clint.rs rename to e310x/src/clint.rs diff --git a/src/clint/msip.rs b/e310x/src/clint/msip.rs similarity index 100% rename from src/clint/msip.rs rename to e310x/src/clint/msip.rs diff --git a/src/clint/mtime.rs b/e310x/src/clint/mtime.rs similarity index 100% rename from src/clint/mtime.rs rename to e310x/src/clint/mtime.rs diff --git a/src/clint/mtimecmp.rs b/e310x/src/clint/mtimecmp.rs similarity index 100% rename from src/clint/mtimecmp.rs rename to e310x/src/clint/mtimecmp.rs diff --git a/src/clint/mtimecmph.rs b/e310x/src/clint/mtimecmph.rs similarity index 100% rename from src/clint/mtimecmph.rs rename to e310x/src/clint/mtimecmph.rs diff --git a/src/clint/mtimeh.rs b/e310x/src/clint/mtimeh.rs similarity index 100% rename from src/clint/mtimeh.rs rename to e310x/src/clint/mtimeh.rs diff --git a/src/generic.rs b/e310x/src/generic.rs similarity index 100% rename from src/generic.rs rename to e310x/src/generic.rs diff --git a/src/gpio0.rs b/e310x/src/gpio0.rs similarity index 100% rename from src/gpio0.rs rename to e310x/src/gpio0.rs diff --git a/src/gpio0/drive.rs b/e310x/src/gpio0/drive.rs similarity index 100% rename from src/gpio0/drive.rs rename to e310x/src/gpio0/drive.rs diff --git a/src/gpio0/fall_ie.rs b/e310x/src/gpio0/fall_ie.rs similarity index 100% rename from src/gpio0/fall_ie.rs rename to e310x/src/gpio0/fall_ie.rs diff --git a/src/gpio0/fall_ip.rs b/e310x/src/gpio0/fall_ip.rs similarity index 100% rename from src/gpio0/fall_ip.rs rename to e310x/src/gpio0/fall_ip.rs diff --git a/src/gpio0/high_ie.rs b/e310x/src/gpio0/high_ie.rs similarity index 100% rename from src/gpio0/high_ie.rs rename to e310x/src/gpio0/high_ie.rs diff --git a/src/gpio0/high_ip.rs b/e310x/src/gpio0/high_ip.rs similarity index 100% rename from src/gpio0/high_ip.rs rename to e310x/src/gpio0/high_ip.rs diff --git a/src/gpio0/input_en.rs b/e310x/src/gpio0/input_en.rs similarity index 100% rename from src/gpio0/input_en.rs rename to e310x/src/gpio0/input_en.rs diff --git a/src/gpio0/input_val.rs b/e310x/src/gpio0/input_val.rs similarity index 100% rename from src/gpio0/input_val.rs rename to e310x/src/gpio0/input_val.rs diff --git a/src/gpio0/iof_en.rs b/e310x/src/gpio0/iof_en.rs similarity index 100% rename from src/gpio0/iof_en.rs rename to e310x/src/gpio0/iof_en.rs diff --git a/src/gpio0/iof_sel.rs b/e310x/src/gpio0/iof_sel.rs similarity index 100% rename from src/gpio0/iof_sel.rs rename to e310x/src/gpio0/iof_sel.rs diff --git a/src/gpio0/low_ie.rs b/e310x/src/gpio0/low_ie.rs similarity index 100% rename from src/gpio0/low_ie.rs rename to e310x/src/gpio0/low_ie.rs diff --git a/src/gpio0/low_ip.rs b/e310x/src/gpio0/low_ip.rs similarity index 100% rename from src/gpio0/low_ip.rs rename to e310x/src/gpio0/low_ip.rs diff --git a/src/gpio0/out_xor.rs b/e310x/src/gpio0/out_xor.rs similarity index 100% rename from src/gpio0/out_xor.rs rename to e310x/src/gpio0/out_xor.rs diff --git a/src/gpio0/output_en.rs b/e310x/src/gpio0/output_en.rs similarity index 100% rename from src/gpio0/output_en.rs rename to e310x/src/gpio0/output_en.rs diff --git a/src/gpio0/output_val.rs b/e310x/src/gpio0/output_val.rs similarity index 100% rename from src/gpio0/output_val.rs rename to e310x/src/gpio0/output_val.rs diff --git a/src/gpio0/pullup.rs b/e310x/src/gpio0/pullup.rs similarity index 100% rename from src/gpio0/pullup.rs rename to e310x/src/gpio0/pullup.rs diff --git a/src/gpio0/rise_ie.rs b/e310x/src/gpio0/rise_ie.rs similarity index 100% rename from src/gpio0/rise_ie.rs rename to e310x/src/gpio0/rise_ie.rs diff --git a/src/gpio0/rise_ip.rs b/e310x/src/gpio0/rise_ip.rs similarity index 100% rename from src/gpio0/rise_ip.rs rename to e310x/src/gpio0/rise_ip.rs diff --git a/src/i2c0.rs b/e310x/src/i2c0.rs similarity index 100% rename from src/i2c0.rs rename to e310x/src/i2c0.rs diff --git a/src/i2c0/cr.rs b/e310x/src/i2c0/cr.rs similarity index 100% rename from src/i2c0/cr.rs rename to e310x/src/i2c0/cr.rs diff --git a/src/i2c0/cr_sr.rs b/e310x/src/i2c0/cr_sr.rs similarity index 100% rename from src/i2c0/cr_sr.rs rename to e310x/src/i2c0/cr_sr.rs diff --git a/src/i2c0/ctr.rs b/e310x/src/i2c0/ctr.rs similarity index 100% rename from src/i2c0/ctr.rs rename to e310x/src/i2c0/ctr.rs diff --git a/src/i2c0/prer_hi.rs b/e310x/src/i2c0/prer_hi.rs similarity index 100% rename from src/i2c0/prer_hi.rs rename to e310x/src/i2c0/prer_hi.rs diff --git a/src/i2c0/prer_lo.rs b/e310x/src/i2c0/prer_lo.rs similarity index 100% rename from src/i2c0/prer_lo.rs rename to e310x/src/i2c0/prer_lo.rs diff --git a/src/i2c0/sr.rs b/e310x/src/i2c0/sr.rs similarity index 100% rename from src/i2c0/sr.rs rename to e310x/src/i2c0/sr.rs diff --git a/src/i2c0/txr_rxr.rs b/e310x/src/i2c0/txr_rxr.rs similarity index 100% rename from src/i2c0/txr_rxr.rs rename to e310x/src/i2c0/txr_rxr.rs diff --git a/src/interrupt.rs b/e310x/src/interrupt.rs similarity index 100% rename from src/interrupt.rs rename to e310x/src/interrupt.rs diff --git a/src/lib.rs b/e310x/src/lib.rs similarity index 100% rename from src/lib.rs rename to e310x/src/lib.rs diff --git a/src/otp.rs b/e310x/src/otp.rs similarity index 100% rename from src/otp.rs rename to e310x/src/otp.rs diff --git a/src/otp/addr.rs b/e310x/src/otp/addr.rs similarity index 100% rename from src/otp/addr.rs rename to e310x/src/otp/addr.rs diff --git a/src/otp/clock.rs b/e310x/src/otp/clock.rs similarity index 100% rename from src/otp/clock.rs rename to e310x/src/otp/clock.rs diff --git a/src/otp/data_in.rs b/e310x/src/otp/data_in.rs similarity index 100% rename from src/otp/data_in.rs rename to e310x/src/otp/data_in.rs diff --git a/src/otp/data_out.rs b/e310x/src/otp/data_out.rs similarity index 100% rename from src/otp/data_out.rs rename to e310x/src/otp/data_out.rs diff --git a/src/otp/lock.rs b/e310x/src/otp/lock.rs similarity index 100% rename from src/otp/lock.rs rename to e310x/src/otp/lock.rs diff --git a/src/otp/mode.rs b/e310x/src/otp/mode.rs similarity index 100% rename from src/otp/mode.rs rename to e310x/src/otp/mode.rs diff --git a/src/otp/mpp.rs b/e310x/src/otp/mpp.rs similarity index 100% rename from src/otp/mpp.rs rename to e310x/src/otp/mpp.rs diff --git a/src/otp/mrr.rs b/e310x/src/otp/mrr.rs similarity index 100% rename from src/otp/mrr.rs rename to e310x/src/otp/mrr.rs diff --git a/src/otp/output_en.rs b/e310x/src/otp/output_en.rs similarity index 100% rename from src/otp/output_en.rs rename to e310x/src/otp/output_en.rs diff --git a/src/otp/rsctrl.rs b/e310x/src/otp/rsctrl.rs similarity index 100% rename from src/otp/rsctrl.rs rename to e310x/src/otp/rsctrl.rs diff --git a/src/otp/select.rs b/e310x/src/otp/select.rs similarity index 100% rename from src/otp/select.rs rename to e310x/src/otp/select.rs diff --git a/src/otp/vppen.rs b/e310x/src/otp/vppen.rs similarity index 100% rename from src/otp/vppen.rs rename to e310x/src/otp/vppen.rs diff --git a/src/otp/vrren.rs b/e310x/src/otp/vrren.rs similarity index 100% rename from src/otp/vrren.rs rename to e310x/src/otp/vrren.rs diff --git a/src/otp/write_en.rs b/e310x/src/otp/write_en.rs similarity index 100% rename from src/otp/write_en.rs rename to e310x/src/otp/write_en.rs diff --git a/src/plic.rs b/e310x/src/plic.rs similarity index 100% rename from src/plic.rs rename to e310x/src/plic.rs diff --git a/src/plic/claim.rs b/e310x/src/plic/claim.rs similarity index 100% rename from src/plic/claim.rs rename to e310x/src/plic/claim.rs diff --git a/src/plic/enable.rs b/e310x/src/plic/enable.rs similarity index 100% rename from src/plic/enable.rs rename to e310x/src/plic/enable.rs diff --git a/src/plic/pending.rs b/e310x/src/plic/pending.rs similarity index 100% rename from src/plic/pending.rs rename to e310x/src/plic/pending.rs diff --git a/src/plic/priority.rs b/e310x/src/plic/priority.rs similarity index 100% rename from src/plic/priority.rs rename to e310x/src/plic/priority.rs diff --git a/src/plic/threshold.rs b/e310x/src/plic/threshold.rs similarity index 100% rename from src/plic/threshold.rs rename to e310x/src/plic/threshold.rs diff --git a/src/pmu.rs b/e310x/src/pmu.rs similarity index 100% rename from src/pmu.rs rename to e310x/src/pmu.rs diff --git a/src/pmu/pmucause.rs b/e310x/src/pmu/pmucause.rs similarity index 100% rename from src/pmu/pmucause.rs rename to e310x/src/pmu/pmucause.rs diff --git a/src/pmu/pmuie.rs b/e310x/src/pmu/pmuie.rs similarity index 100% rename from src/pmu/pmuie.rs rename to e310x/src/pmu/pmuie.rs diff --git a/src/pmu/pmukey.rs b/e310x/src/pmu/pmukey.rs similarity index 100% rename from src/pmu/pmukey.rs rename to e310x/src/pmu/pmukey.rs diff --git a/src/pmu/pmusleep.rs b/e310x/src/pmu/pmusleep.rs similarity index 100% rename from src/pmu/pmusleep.rs rename to e310x/src/pmu/pmusleep.rs diff --git a/src/pmu/pmusleeppm.rs b/e310x/src/pmu/pmusleeppm.rs similarity index 100% rename from src/pmu/pmusleeppm.rs rename to e310x/src/pmu/pmusleeppm.rs diff --git a/src/pmu/pmuwakepm.rs b/e310x/src/pmu/pmuwakepm.rs similarity index 100% rename from src/pmu/pmuwakepm.rs rename to e310x/src/pmu/pmuwakepm.rs diff --git a/src/prci.rs b/e310x/src/prci.rs similarity index 100% rename from src/prci.rs rename to e310x/src/prci.rs diff --git a/src/prci/coreclkcfg.rs b/e310x/src/prci/coreclkcfg.rs similarity index 100% rename from src/prci/coreclkcfg.rs rename to e310x/src/prci/coreclkcfg.rs diff --git a/src/prci/hfrosccfg.rs b/e310x/src/prci/hfrosccfg.rs similarity index 100% rename from src/prci/hfrosccfg.rs rename to e310x/src/prci/hfrosccfg.rs diff --git a/src/prci/hfxosccfg.rs b/e310x/src/prci/hfxosccfg.rs similarity index 100% rename from src/prci/hfxosccfg.rs rename to e310x/src/prci/hfxosccfg.rs diff --git a/src/prci/pllcfg.rs b/e310x/src/prci/pllcfg.rs similarity index 100% rename from src/prci/pllcfg.rs rename to e310x/src/prci/pllcfg.rs diff --git a/src/prci/plloutdiv.rs b/e310x/src/prci/plloutdiv.rs similarity index 100% rename from src/prci/plloutdiv.rs rename to e310x/src/prci/plloutdiv.rs diff --git a/src/pwm0.rs b/e310x/src/pwm0.rs similarity index 100% rename from src/pwm0.rs rename to e310x/src/pwm0.rs diff --git a/src/pwm0/cfg.rs b/e310x/src/pwm0/cfg.rs similarity index 100% rename from src/pwm0/cfg.rs rename to e310x/src/pwm0/cfg.rs diff --git a/src/pwm0/cmp0.rs b/e310x/src/pwm0/cmp0.rs similarity index 100% rename from src/pwm0/cmp0.rs rename to e310x/src/pwm0/cmp0.rs diff --git a/src/pwm0/cmp1.rs b/e310x/src/pwm0/cmp1.rs similarity index 100% rename from src/pwm0/cmp1.rs rename to e310x/src/pwm0/cmp1.rs diff --git a/src/pwm0/cmp2.rs b/e310x/src/pwm0/cmp2.rs similarity index 100% rename from src/pwm0/cmp2.rs rename to e310x/src/pwm0/cmp2.rs diff --git a/src/pwm0/cmp3.rs b/e310x/src/pwm0/cmp3.rs similarity index 100% rename from src/pwm0/cmp3.rs rename to e310x/src/pwm0/cmp3.rs diff --git a/src/pwm0/count.rs b/e310x/src/pwm0/count.rs similarity index 100% rename from src/pwm0/count.rs rename to e310x/src/pwm0/count.rs diff --git a/src/pwm0/pwms.rs b/e310x/src/pwm0/pwms.rs similarity index 100% rename from src/pwm0/pwms.rs rename to e310x/src/pwm0/pwms.rs diff --git a/src/qspi0.rs b/e310x/src/qspi0.rs similarity index 100% rename from src/qspi0.rs rename to e310x/src/qspi0.rs diff --git a/src/qspi0/csdef.rs b/e310x/src/qspi0/csdef.rs similarity index 100% rename from src/qspi0/csdef.rs rename to e310x/src/qspi0/csdef.rs diff --git a/src/qspi0/csid.rs b/e310x/src/qspi0/csid.rs similarity index 100% rename from src/qspi0/csid.rs rename to e310x/src/qspi0/csid.rs diff --git a/src/qspi0/csmode.rs b/e310x/src/qspi0/csmode.rs similarity index 100% rename from src/qspi0/csmode.rs rename to e310x/src/qspi0/csmode.rs diff --git a/src/qspi0/delay0.rs b/e310x/src/qspi0/delay0.rs similarity index 100% rename from src/qspi0/delay0.rs rename to e310x/src/qspi0/delay0.rs diff --git a/src/qspi0/delay1.rs b/e310x/src/qspi0/delay1.rs similarity index 100% rename from src/qspi0/delay1.rs rename to e310x/src/qspi0/delay1.rs diff --git a/src/qspi0/fctrl.rs b/e310x/src/qspi0/fctrl.rs similarity index 100% rename from src/qspi0/fctrl.rs rename to e310x/src/qspi0/fctrl.rs diff --git a/src/qspi0/ffmt.rs b/e310x/src/qspi0/ffmt.rs similarity index 100% rename from src/qspi0/ffmt.rs rename to e310x/src/qspi0/ffmt.rs diff --git a/src/qspi0/fmt.rs b/e310x/src/qspi0/fmt.rs similarity index 100% rename from src/qspi0/fmt.rs rename to e310x/src/qspi0/fmt.rs diff --git a/src/qspi0/ie.rs b/e310x/src/qspi0/ie.rs similarity index 100% rename from src/qspi0/ie.rs rename to e310x/src/qspi0/ie.rs diff --git a/src/qspi0/ip.rs b/e310x/src/qspi0/ip.rs similarity index 100% rename from src/qspi0/ip.rs rename to e310x/src/qspi0/ip.rs diff --git a/src/qspi0/rxdata.rs b/e310x/src/qspi0/rxdata.rs similarity index 100% rename from src/qspi0/rxdata.rs rename to e310x/src/qspi0/rxdata.rs diff --git a/src/qspi0/rxmark.rs b/e310x/src/qspi0/rxmark.rs similarity index 100% rename from src/qspi0/rxmark.rs rename to e310x/src/qspi0/rxmark.rs diff --git a/src/qspi0/sckdiv.rs b/e310x/src/qspi0/sckdiv.rs similarity index 100% rename from src/qspi0/sckdiv.rs rename to e310x/src/qspi0/sckdiv.rs diff --git a/src/qspi0/sckmode.rs b/e310x/src/qspi0/sckmode.rs similarity index 100% rename from src/qspi0/sckmode.rs rename to e310x/src/qspi0/sckmode.rs diff --git a/src/qspi0/txdata.rs b/e310x/src/qspi0/txdata.rs similarity index 100% rename from src/qspi0/txdata.rs rename to e310x/src/qspi0/txdata.rs diff --git a/src/qspi0/txmark.rs b/e310x/src/qspi0/txmark.rs similarity index 100% rename from src/qspi0/txmark.rs rename to e310x/src/qspi0/txmark.rs diff --git a/src/rtc.rs b/e310x/src/rtc.rs similarity index 100% rename from src/rtc.rs rename to e310x/src/rtc.rs diff --git a/src/rtc/rtccfg.rs b/e310x/src/rtc/rtccfg.rs similarity index 100% rename from src/rtc/rtccfg.rs rename to e310x/src/rtc/rtccfg.rs diff --git a/src/rtc/rtccmp.rs b/e310x/src/rtc/rtccmp.rs similarity index 100% rename from src/rtc/rtccmp.rs rename to e310x/src/rtc/rtccmp.rs diff --git a/src/rtc/rtchi.rs b/e310x/src/rtc/rtchi.rs similarity index 100% rename from src/rtc/rtchi.rs rename to e310x/src/rtc/rtchi.rs diff --git a/src/rtc/rtclo.rs b/e310x/src/rtc/rtclo.rs similarity index 100% rename from src/rtc/rtclo.rs rename to e310x/src/rtc/rtclo.rs diff --git a/src/rtc/rtcs.rs b/e310x/src/rtc/rtcs.rs similarity index 100% rename from src/rtc/rtcs.rs rename to e310x/src/rtc/rtcs.rs diff --git a/src/uart0.rs b/e310x/src/uart0.rs similarity index 100% rename from src/uart0.rs rename to e310x/src/uart0.rs diff --git a/src/uart0/div.rs b/e310x/src/uart0/div.rs similarity index 100% rename from src/uart0/div.rs rename to e310x/src/uart0/div.rs diff --git a/src/uart0/ie.rs b/e310x/src/uart0/ie.rs similarity index 100% rename from src/uart0/ie.rs rename to e310x/src/uart0/ie.rs diff --git a/src/uart0/ip.rs b/e310x/src/uart0/ip.rs similarity index 100% rename from src/uart0/ip.rs rename to e310x/src/uart0/ip.rs diff --git a/src/uart0/rxctrl.rs b/e310x/src/uart0/rxctrl.rs similarity index 100% rename from src/uart0/rxctrl.rs rename to e310x/src/uart0/rxctrl.rs diff --git a/src/uart0/rxdata.rs b/e310x/src/uart0/rxdata.rs similarity index 100% rename from src/uart0/rxdata.rs rename to e310x/src/uart0/rxdata.rs diff --git a/src/uart0/txctrl.rs b/e310x/src/uart0/txctrl.rs similarity index 100% rename from src/uart0/txctrl.rs rename to e310x/src/uart0/txctrl.rs diff --git a/src/uart0/txdata.rs b/e310x/src/uart0/txdata.rs similarity index 100% rename from src/uart0/txdata.rs rename to e310x/src/uart0/txdata.rs diff --git a/src/wdog.rs b/e310x/src/wdog.rs similarity index 100% rename from src/wdog.rs rename to e310x/src/wdog.rs diff --git a/src/wdog/wdogcfg.rs b/e310x/src/wdog/wdogcfg.rs similarity index 100% rename from src/wdog/wdogcfg.rs rename to e310x/src/wdog/wdogcfg.rs diff --git a/src/wdog/wdogcmp.rs b/e310x/src/wdog/wdogcmp.rs similarity index 100% rename from src/wdog/wdogcmp.rs rename to e310x/src/wdog/wdogcmp.rs diff --git a/src/wdog/wdogcount.rs b/e310x/src/wdog/wdogcount.rs similarity index 100% rename from src/wdog/wdogcount.rs rename to e310x/src/wdog/wdogcount.rs diff --git a/src/wdog/wdogfeed.rs b/e310x/src/wdog/wdogfeed.rs similarity index 100% rename from src/wdog/wdogfeed.rs rename to e310x/src/wdog/wdogfeed.rs diff --git a/src/wdog/wdogkey.rs b/e310x/src/wdog/wdogkey.rs similarity index 100% rename from src/wdog/wdogkey.rs rename to e310x/src/wdog/wdogkey.rs diff --git a/src/wdog/wdogs.rs b/e310x/src/wdog/wdogs.rs similarity index 100% rename from src/wdog/wdogs.rs rename to e310x/src/wdog/wdogs.rs diff --git a/update.sh b/e310x/update.sh similarity index 100% rename from update.sh rename to e310x/update.sh