Compare commits
7 Commits
0d74fd250f
...
v0.3.1
Author | SHA1 | Date | |
---|---|---|---|
5f6914a93a | |||
2de11478fb | |||
6f1d2554d5 | |||
166bc5d9b0 | |||
2ecfdb770f | |||
b4200fc8c5 | |||
698af5fa9f |
@@ -6,7 +6,11 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
## [unreleased]
|
## [v0.3.1]
|
||||||
|
|
||||||
|
- Updated all links to point to new repository
|
||||||
|
|
||||||
|
## [v0.3.0]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@@ -15,6 +19,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- `CountDownTimer` new function now expects an `impl Into<Hertz>` instead of `Hertz`
|
- `CountDownTimer` new function now expects an `impl Into<Hertz>` instead of `Hertz`
|
||||||
|
- Primary repository now hosted on IRS external git: https://egit.irs.uni-stuttgart.de/rust/va108xx-hal
|
||||||
|
- Relicensed as Apache-2.0
|
||||||
|
|
||||||
## [0.2.3]
|
## [0.2.3]
|
||||||
|
|
||||||
|
10
Cargo.toml
10
Cargo.toml
@@ -1,12 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "va108xx-hal"
|
name = "va108xx-hal"
|
||||||
version = "0.2.3"
|
version = "0.3.1"
|
||||||
authors = ["Robin Mueller <robin.mueller.m@gmail.com>"]
|
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "HAL for the Vorago VA108xx family of microcontrollers"
|
description = "HAL for the Vorago VA108xx family of microcontrollers"
|
||||||
homepage = "https://github.com/robamu-org/va108xx-hal-rs"
|
homepage = "https://egit.irs.uni-stuttgart.de/rust/va108xx-hal"
|
||||||
repository = "https://github.com/robamu-org/va108xx-hal-rs"
|
repository = "https://egit.irs.uni-stuttgart.de/rust/va108xx-hal"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "Apache-2.0"
|
||||||
keywords = ["no-std", "hal", "cortex-m", "vorago", "va108xx"]
|
keywords = ["no-std", "hal", "cortex-m", "vorago", "va108xx"]
|
||||||
categories = ["embedded", "no-std", "hardware-support"]
|
categories = ["embedded", "no-std", "hardware-support"]
|
||||||
|
|
||||||
|
25
LICENSE-MIT
25
LICENSE-MIT
@@ -1,25 +0,0 @@
|
|||||||
Copyright (c) 2021 Robin Mueller
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any
|
|
||||||
person obtaining a copy of this software and associated
|
|
||||||
documentation files (the "Software"), to deal in the
|
|
||||||
Software without restriction, including without
|
|
||||||
limitation the rights to use, copy, modify, merge,
|
|
||||||
publish, distribute, sublicense, and/or sell copies of
|
|
||||||
the Software, and to permit persons to whom the Software
|
|
||||||
is furnished to do so, subject to the following
|
|
||||||
conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice
|
|
||||||
shall be included in all copies or substantial portions
|
|
||||||
of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
||||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
||||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
||||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
||||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
DEALINGS IN THE SOFTWARE.
|
|
3
NOTICE
Normal file
3
NOTICE
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Rust Hardware Abstraction Layer (HAL) crate for the Vorago VA108xx family of MCUs
|
||||||
|
|
||||||
|
This software contains code developed at the University of Stuttgart.
|
10
README.md
10
README.md
@@ -59,7 +59,7 @@ your custom board.
|
|||||||
|
|
||||||
The hello world of embedded development is usually to blinky a LED. This example
|
The hello world of embedded development is usually to blinky a LED. This example
|
||||||
is contained within the
|
is contained within the
|
||||||
[examples folder](https://github.com/robamu-org/va108xx-hal-rs/tree/main/examples/blinky.rs).
|
[examples folder](https://egit.irs.uni-stuttgart.de/rust/va108xx-hal/src/branch/main/examples/blinky.rs).
|
||||||
|
|
||||||
1. Set up your Rust cross-compiler if you have not done so yet. See more in the [build chapter](#Building)
|
1. Set up your Rust cross-compiler if you have not done so yet. See more in the [build chapter](#Building)
|
||||||
2. Create a new binary crate with `cargo init`
|
2. Create a new binary crate with `cargo init`
|
||||||
@@ -81,12 +81,8 @@ is contained within the
|
|||||||
features = ["rt"]
|
features = ["rt"]
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Build the application with
|
6. Build the application with `cargo build`
|
||||||
|
|
||||||
```sh
|
|
||||||
cargo build
|
|
||||||
```
|
|
||||||
|
|
||||||
7. Flashing the board might work differently for different boards and there is usually
|
7. Flashing the board might work differently for different boards and there is usually
|
||||||
more than one way. You can find example instructions for the REB1 development board
|
more than one way. You can find example instructions for the REB1 development board
|
||||||
[here](https://github.com/robamu/vorago-reb1-rs).
|
[here](https://github.com/robamu-org/vorago-reb1-rs).
|
||||||
|
11
automation/Dockerfile
Normal file
11
automation/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Run the following commands from root directory to build and run locally
|
||||||
|
# docker build -f automation/Dockerfile -t <NAME> .
|
||||||
|
# docker run -it <NAME>
|
||||||
|
FROM rust:latest
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get --yes upgrade
|
||||||
|
# tzdata is a dependency, won't install otherwise
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN rustup target add thumbv6m-none-eabi && \
|
||||||
|
rustup component add rustfmt clippy
|
50
automation/Jenkinsfile
vendored
Normal file
50
automation/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Clippy') {
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'automation'
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'cargo clippy'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Rustfmt') {
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'automation'
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'cargo fmt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Check') {
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'automation'
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'cargo check --target thumbv6m-none-eabi'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Check Examples') {
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'automation'
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'cargo check --target thumbv6m-none-eabi --examples'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -20,7 +20,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ## Examples
|
//! ## Examples
|
||||||
//!
|
//!
|
||||||
//! - [Blinky example](https://github.com/robamu-org/va108xx-hal-rs/blob/main/examples/blinky.rs)
|
//! - [Blinky example](https://egit.irs.uni-stuttgart.de/rust/va108xx-hal/src/branch/main/examples/blinky.rs)
|
||||||
pub mod dynpins;
|
pub mod dynpins;
|
||||||
pub use dynpins::*;
|
pub use dynpins::*;
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ## Examples
|
//! ## Examples
|
||||||
//!
|
//!
|
||||||
//! - [PWM example](https://github.com/robamu-org/va108xx-hal-rs/blob/main/examples/pwm.rs)
|
//! - [PWM example](https://egit.irs.uni-stuttgart.de/rust/va108xx-hal/src/branch/main/examples/pwm.rs)
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
use crate::{clock::enable_peripheral_clock, gpio::DynPinId};
|
use crate::{clock::enable_peripheral_clock, gpio::DynPinId};
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ## Examples
|
//! ## Examples
|
||||||
//!
|
//!
|
||||||
//! - [Blocking SPI example](https://github.com/robamu-org/va108xx-hal-rs/blob/main/examples/spi.rs)
|
//! - [Blocking SPI example](https://egit.irs.uni-stuttgart.de/rust/va108xx-hal/src/branch/main/examples/spi.rs)
|
||||||
use crate::Sealed;
|
use crate::Sealed;
|
||||||
use crate::{
|
use crate::{
|
||||||
clock::{enable_peripheral_clock, PeripheralClocks},
|
clock::{enable_peripheral_clock, PeripheralClocks},
|
||||||
|
@@ -2,7 +2,8 @@
|
|||||||
//!
|
//!
|
||||||
//! ## Examples
|
//! ## Examples
|
||||||
//!
|
//!
|
||||||
//! - [MS and second tick implementation](https://github.com/robamu-org/va108xx-hal-rs/blob/main/examples/timer-ticks.rs)
|
//! - [MS and second tick implementation](https://egit.irs.uni-stuttgart.de/rust/va108xx-hal/src/branch/main/examples/timer-ticks.rs)
|
||||||
|
//! - [Cascade feature example](https://egit.irs.uni-stuttgart.de/rust/va108xx-hal/src/branch/main/examples/cascade.rs)
|
||||||
use crate::{
|
use crate::{
|
||||||
clock::{enable_peripheral_clock, PeripheralClocks},
|
clock::{enable_peripheral_clock, PeripheralClocks},
|
||||||
gpio::{
|
gpio::{
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ## Examples
|
//! ## Examples
|
||||||
//!
|
//!
|
||||||
//! - [UART example](https://github.com/robamu-org/va108xx-hal-rs/blob/main/examples/uart.rs)
|
//! - [UART example](https://egit.irs.uni-stuttgart.de/rust/va108xx-hal/src/branch/main/examples/uart.rs)
|
||||||
use core::{convert::Infallible, ptr};
|
use core::{convert::Infallible, ptr};
|
||||||
use core::{marker::PhantomData, ops::Deref};
|
use core::{marker::PhantomData, ops::Deref};
|
||||||
use libm::floorf;
|
use libm::floorf;
|
||||||
|
Reference in New Issue
Block a user