Skip to content

Commit

Permalink
Merge pull request #4 from RusPiRo/feature/split_into_core
Browse files Browse the repository at this point in the history
Split core parts from interrupt crate into separate one
  • Loading branch information
2ndTaleStudio authored Aug 27, 2019
2 parents 5a9701e + e991e16 commit db5e1a6
Show file tree
Hide file tree
Showing 15 changed files with 305 additions and 307 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
**/*/target
**/*.rs.bk
**/release
.vscode
Expand Down
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ matrix:

include:
- rust: nightly
env:
- TARGET=armv7-unknown-linux-gnueabihf
- CFLAGS='-std=c11 -mfpu=neon-fp-armv8 -mfloat-abi=hard -march=armv8-a -Wall -O3 -nostartfiles -ffreestanding -mtune=cortex-a53'
- RUSTFLAGS='-C target-cpu=cortex-a53 -C target-feature=+a53,+fp-armv8,+v8,+vfp3,+d16,+thumb2,+neon'

script:
cargo build --target armv7-unknown-linux-gnueabihf --verbose
script: ./travis-build.sh

install:
# install cross compiler toolchain
- sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- rustup target add armv7-unknown-linux-gnueabihf
# install cargo xbuild to proper cross compile
- cargo install cargo-xbuild
# add the build target used for Raspbarry Pi targeting builds
- rustup target add armv7-unknown-linux-gnueabihf
- rustup component add rust-src
- sudo chmod ugo+x ./travis-build.sh
65 changes: 35 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 8 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "ruspiro-interrupt"
authors = ["Andre Borrmann <[email protected]>"]
version = "0.2.0" # remember to update html_root_url
version = "0.2.1" # remember to update html_root_url
description = "Providing a simple and convinient way to implement interrupt handler for Raspberry Pi interrupts."
license = "Apache-2.0"
repository = "https://github.com/RusPiRo/ruspiro-interrupt/tree/v0.2.0"
documentation = "https://docs.rs/ruspiro-interrupt/0.2.0"
repository = "https://github.com/RusPiRo/ruspiro-interrupt/tree/v0.2.1"
documentation = "https://docs.rs/ruspiro-interrupt/0.2.1"
readme = "README.md"
keywords = ["RusPiRo", "baremetal", "raspberrypi", "interrupt"]
categories = ["no-std", "embedded"]
Expand All @@ -15,17 +15,15 @@ edition = "2018"
travis-ci = { repository = "RusPiRo/ruspiro-interrupt", branch = "master" }
maintenance = { status = "actively-developed" }

[workspace]
members = ["macros"]

[lib]

[dependencies]
paste = "0.1.5"
ruspiro-register = "0.1.1"
ruspiro-interrupt-macros = { path = "./macros", version = "0.2.0" }
ruspiro-singleton = "0.1.0"
ruspiro-register = "0.1"
ruspiro-interrupt-core = { path = "./core", version = "0.2" }
ruspiro-interrupt-macros = { path = "./macros", version = "0.2" }
ruspiro-singleton = "0.2"

[features]
default = ["ruspiro_pi3"]
ruspiro_pi3 = []
ruspiro_pi3 = []
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ script providing all the necessary linker symbols and entrypoints calling into t
To use the crate just add the following dependency to your ``Cargo.toml`` file:
```
[dependencies]
ruspiro-interrupt = "0.2.0"
ruspiro-interrupt = "0.2"
```

Once done the access to the features/attribute of the interrupt crate is available in your rust files like so:
Expand All @@ -38,5 +38,8 @@ unsafe fn my_handler_for_source() {
}
```

The currently only implemented shared source interrupt line is the ``AUX`` interrupt. There the source could be one of:
``Uart1``, ``Spi1`` or ``Spi2``.

## License
Licensed under Apache License, Version 2.0, ([LICENSE](LICENSE) or http://www.apache.org/licenses/LICENSE-2.0)
22 changes: 22 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "ruspiro-interrupt-core"
authors = ["Andre Borrmann <[email protected]>"]
version = "0.2.0" # remember to update html_root_url
description = "Interrupt core functions to globally enable/disable interrupts on Raspberry Pi"
license = "Apache-2.0"
repository = "https://github.com/RusPiRo/ruspiro-interrupt/tree/v0.2.1/core"
documentation = "https://docs.rs/ruspiro-interrupt-core/0.2.0"
readme = "README.md"
keywords = ["RusPiRo", "baremetal", "raspberrypi", "interrupt"]
categories = ["no-std", "embedded"]
edition = "2018"

[badges]
travis-ci = { repository = "RusPiRo/ruspiro-interrupt", branch = "master" }
maintenance = { status = "actively-developed" }

[lib]

[dependencies]

[features]
32 changes: 32 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# RusPiRo core interrupt crate

Core interrupt functions to globally enable/disable interrupts to be triggered on Raspberry Pi. Splitting from the
[``ruspiro-interrupt`` crate](https://crates.io/crates/ruspiro-interrupt) is necessary to prevent circular dependencies.

[![Travis-CI Status](https://api.travis-ci.org/RusPiRo/ruspiro-interrupt.svg?branch=master)](https://travis-ci.org/RusPiRo/ruspiro-interrupt)
[![Latest Version](https://img.shields.io/crates/v/ruspiro-interrupt-core.svg)](https://crates.io/crates/ruspiro-interrupt-core)
[![Documentation](https://docs.rs/ruspiro-interrupt-core/badge.svg)](https://docs.rs/ruspiro-interrupt-core)
[![License](https://img.shields.io/crates/l/ruspiro-interrupt-core.svg)](https://github.com/RusPiRo/ruspiro-interrupt-core#license)


## Usage
To use the crate just add the following dependency to your ``Cargo.toml`` file:
```
[dependencies]
ruspiro-interrupt-core = "0.2"
```

Once done the access to the functions to enable/disable interrupts is available in your rust files like so:
```
use ruspiro_interrupt_core::*;
fn demo() {
enable_interrupts();
disable_interrupts();
re_enable_interrupts();
}
```

## License
Licensed under Apache License, Version 2.0, ([LICENSE](LICENSE) or http://www.apache.org/licenses/LICENSE-2.0)
Loading

0 comments on commit db5e1a6

Please sign in to comment.