Compare commits

...

9 Commits
v0.3.2 ... main

Author SHA1 Message Date
Robin Müller bdd804f88b
lets try without cross..
Rust/vorago-reb1/pipeline/head This commit looks good Details
2022-09-27 20:55:20 +02:00
Robin Müller f4cd3b704b
typo
Rust/vorago-reb1/pipeline/head This commit looks good Details
2022-09-27 20:51:37 +02:00
Robin Müller 7e2bb8618e
bump dependencies
Rust/vorago-reb1/pipeline/head This commit looks good Details
2022-09-13 10:58:54 +02:00
Robin Müller 6931432dcd
add eq auto-derive
Rust/vorago-reb1/pipeline/head This commit looks good Details
2022-09-13 10:47:23 +02:00
Robin Müller 742a53d63a
cargo fmt
Rust/vorago-reb1/pipeline/head This commit looks good Details
2022-06-18 22:33:00 +02:00
Robin Müller 3304410a64
update links in README
Rust/vorago-reb1/pipeline/head This commit looks good Details
2022-06-18 22:30:58 +02:00
Robin Müller 37629f2ba1
small form change and CHANGELOG
Rust/vorago-reb1/pipeline/head This commit looks good Details
2022-06-18 22:29:55 +02:00
Robin Müller bffba52fa5
update manifest file and deps 2022-06-18 22:26:36 +02:00
Robin Müller ab439ac35d
clippy fix 2022-06-18 22:16:31 +02:00
6 changed files with 42 additions and 32 deletions

View File

@ -16,11 +16,9 @@ jobs:
override: true override: true
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
use-cross: true
command: check command: check
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
use-cross: true
command: check command: check
args: --examples args: --examples
@ -54,7 +52,6 @@ jobs:
- run: rustup component add clippy - run: rustup component add clippy
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
use-cross: true
command: clippy command: clippy
args: -- -D warnings args: -- -D warnings

View File

@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [unreleased] ## [unreleased]
## [v0.4.0]
- Update manifest file to have correct links and license
- Update some dependencies
- `cortex-m-rtic` (dev-depencency) to 1.1.2
- Other dependencies: Only revision has changed
## [v0.3.2] ## [v0.3.2]
- Bump HAL dependency to v0.5.0. Changed API, especially for IRQ handling - Bump HAL dependency to v0.5.0. Changed API, especially for IRQ handling

View File

@ -1,32 +1,38 @@
[package] [package]
name = "vorago-reb1" name = "vorago-reb1"
version = "0.3.2" version = "0.4.0"
authors = ["Robin Mueller <robin.mueller.m@gmail.com>"] authors = ["Robin Mueller <robin.mueller.m@gmail.com>"]
edition = "2021" edition = "2021"
description = "Board Support Crate for the Vorago REB1 development board" description = "Board Support Crate for the Vorago REB1 development board"
homepage = "https://github.com/robamu/vorago-reb1-rs" homepage = "https://egit.irs.uni-stuttgart.de/rust/vorago-reb1"
repository = "https://github.com/robamu/vorago-reb1-rs" repository = "https://egit.irs.uni-stuttgart.de/rust/vorago-reb1"
license = "MIT OR Apache-2.0" license = "Apache-2.0"
keywords = ["no-std", "reb1", "cortex-m", "vorago", "va108xx"] keywords = ["no-std", "reb1", "cortex-m", "vorago", "va108xx"]
categories = ["embedded", "no-std", "hardware-support"] categories = ["aerospace", "embedded", "no-std", "hardware-support"]
[dependencies] [dependencies]
cortex-m = "0.7.3" cortex-m = "0.7"
cortex-m-rt = "0.7.0" cortex-m-rt = "0.7"
embedded-hal = "0.2.6" embedded-hal = "0.2.7"
dummy-pin = "0.1.1" dummy-pin = "0.1"
max116xx-10bit = "0.2.1" max116xx-10bit = "0.2"
[dependencies.va108xx-hal] [dependencies.va108xx-hal]
version = "0.5.0" version = "0.5"
features = ["rt"] features = ["rt"]
[features] [features]
rt = ["va108xx-hal/rt"] rt = ["va108xx-hal/rt"]
[dev-dependencies] [dev-dependencies]
cortex-m-rtic = "0.6.0-rc.4" cortex-m-rtic = "1.1"
panic-rtt-target = { version = "0.1", features = ["cortex-m"] }
rtt-target = { version = "0.3", features = ["cortex-m"] }
panic-halt = "0.2" panic-halt = "0.2"
nb = "1.0.0" nb = "1"
[dev-dependencies.rtt-target]
version = "0.3"
features = ["cortex-m"]
[dev-dependencies.panic-rtt-target]
version = "0.1"
features = ["cortex-m"]

View File

@ -1,5 +1,5 @@
[![Crates.io](https://img.shields.io/crates/v/vorago-reb1)](https://crates.io/crates/vorago-reb1) [![Crates.io](https://img.shields.io/crates/v/vorago-reb1)](https://crates.io/crates/vorago-reb1)
[![ci](https://github.com/robamu-org/vorago-reb1-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/robamu-org/vorago-reb1-rs/actions/workflows/ci.yml) [![ci](https://github.com/us-irs/vorago-reb1-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/us-irs/vorago-reb1-rs/actions/workflows/ci.yml)
[![docs.rs](https://img.shields.io/docsrs/vorago-reb1)](https://docs.rs/vorago-reb1) [![docs.rs](https://img.shields.io/docsrs/vorago-reb1)](https://docs.rs/vorago-reb1)
# Rust BSP for the Vorago REB1 development board # Rust BSP for the Vorago REB1 development board
@ -7,7 +7,7 @@
This is the Rust **B**oard **S**upport **P**ackage crate for the Vorago REB1 development board. This is the Rust **B**oard **S**upport **P**ackage crate for the Vorago REB1 development board.
Its aim is to provide drivers for the board features of the REB1 board Its aim is to provide drivers for the board features of the REB1 board
The BSP builds on top of the [HAL crate for VA108xx devices](https://github.com/robamu-org/va108xx-hal-rs). The BSP builds on top of the [HAL crate for VA108xx devices](https://egit.irs.uni-stuttgart.de/rust/va108xx-hal).
## Building ## Building
@ -58,8 +58,9 @@ A `jlink.gdb` file is provided to allow flashing of the board from the command l
## Debugging with VS Code ## Debugging with VS Code
The REB1 board features an on-board JTAG, so all that is required to flash the board is a The REB1 board features an on-board JTAG, so all that is required to debug the board is a
Micro-USB cable and an Micro-USB cable.
You can debug applications on the REB1 board with a graphical user interface using VS Code with You can debug applications on the REB1 board with a graphical user interface using VS Code with
the [`Cortex-Debug` plugin](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug). the [`Cortex-Debug` plugin](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug).

View File

@ -135,11 +135,11 @@ mod app {
for i in 0..read { for i in 0..read {
let val = read_buf[i] as char; let val = read_buf[i] as char;
if val == '0' || val == '1' { if val == '0' || val == '1' {
if val == '0' { return if val == '0' {
return PressMode::Toggle; PressMode::Toggle
} else { } else {
return PressMode::Keep; PressMode::Keep
} };
} }
} }
} }

View File

@ -21,7 +21,7 @@ pub struct Adt75TempSensor {
current_reg: RegAddresses, current_reg: RegAddresses,
} }
#[derive(PartialEq, Debug, Copy, Clone)] #[derive(PartialEq, Eq, Debug, Copy, Clone)]
pub enum RegAddresses { pub enum RegAddresses {
Temperature = 0x00, Temperature = 0x00,
Configuration = 0x01, Configuration = 0x01,
@ -67,15 +67,14 @@ impl Adt75TempSensor {
let mut reply: [u8; 2] = [0; 2]; let mut reply: [u8; 2] = [0; 2];
self.sensor_if.read(ADT75_I2C_ADDR, &mut reply)?; self.sensor_if.read(ADT75_I2C_ADDR, &mut reply)?;
let adc_code = (((reply[0] as u16) << 8) | reply[1] as u16) >> 4; let adc_code = (((reply[0] as u16) << 8) | reply[1] as u16) >> 4;
let temp_celcius: f32; let temp_celcius: f32 = if ((adc_code >> 11) & 0x01) == 0 {
if ((adc_code >> 11) & 0x01) == 0 {
// Sign bit not set, positiv value // Sign bit not set, positiv value
// Divide ADC code by 16 according to datasheet // Divide ADC code by 16 according to datasheet
temp_celcius = adc_code as f32 / 16.0; adc_code as f32 / 16.0
} else { } else {
// Calculation for negative values, assuming all 12 bits are used // Calculation for negative values, assuming all 12 bits are used
temp_celcius = (adc_code - 4096) as f32 / 16.0; (adc_code - 4096) as f32 / 16.0
} };
Ok(temp_celcius) Ok(temp_celcius)
} }
} }