Skip to content

Commit

Permalink
Cargo Metadata (#13)
Browse files Browse the repository at this point in the history
* fixing feature flag for rt

* increasing patch version

* adding keywords to cargo

* Improving readme and cargo metadata

* closing code tag

* Updating keywords

* expanding rust workflow
  • Loading branch information
lucasbrendel authored and probot-auto-merge[bot] committed Oct 21, 2019
1 parent 27a763a commit a84f76b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Rust

on:
pull_request:
push:
branches:
- master

Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name = "xmc4100"
description = "XMC4100 Cortex-M peripheral access library"
license = "MIT"
version = "0.3.1"
readme = "README.md"
authors = ["Lucas Brendel <[email protected]>"]
repository = "https://github.com/xmc-rs/xmc4100"
documentation = "https://docs.rs/xmc4100"
keywords = ["cortex-m", "xmc4x", "no_std", "svd2rust", "embedded"]
categories = ["embedded", "no-std"]

[dependencies]
cortex-m = "0.6.1"
Expand All @@ -18,3 +21,6 @@ version = "0.6.10"

[features]
rt = ["cortex-m-rt/device"]

[package.metadata.docs.rs]
features = ['rt']
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
# XMC4100
# XMC4100

> THIS IS A WORK IN PROGRESS AND MUCH IS UNTESED
[![crates.io](https://img.shields.io/crates/v/xmc4100.svg)](https://crates.io/crates/xmc4100)
[![rust](https://github.com/xmc-rs/xmc4100/workflows/Rust/badge.svg)](https://github.com/xmc-rs/xmc4100/workflows/Rust/badge.svg)

This is a 'peripheral access crate' for interfacing to the XMC4100 series of microcontrollers for embedded support in Rust that is generated using [svd2rust](https://docs.rs/svd2rust) and an SVD file provided by Infineon.

There is an optional `rt` that can be utilized. An explanation of the feature is given by [svd2rust](https://docs.rs/svd2rust/0.16.1/svd2rust/#the-rt-feature)

All API's and usage (besides what registers exist) are defined by [svd2rust](https://docs.rs/svd2rust)

## Generate Crate from SVD

```bash
# Necessary 3rd-party tools
cargo install svd2rust
cargo install form
rustup component add rustfmt

svd.sh # Generates code from crate and formats to rustfmt
```

## Using Crate

```toml
[dependencies.xmc4100]
version = "0.3.1"
features = ["rt"]
```

0 comments on commit a84f76b

Please sign in to comment.