Skip to content

Commit

Permalink
refactor: s/regs/registers
Browse files Browse the repository at this point in the history
Following a brief IRC discussion, update regs to registers
https://bot.tockos.org/tockbot/tock/2018-07-09/?msg=111467&page=1

Summary of IRC:

> I'm pretty adverse to needless abbreviations, and despite the folder name
> tock-register-interface everything internally is tock-regs and examples use
> regs. I'm inclined to change this to tock-registers and registers before
> publishing.
>
> +1's from Brad and Amit

Then revised in discussion in #1105 to only rename some instances
of regs to registers, which I disagree with, but don't care enough
to fight about.
  • Loading branch information
ppannuto committed Jul 12, 2018
1 parent 9f76bf6 commit 646de24
Show file tree
Hide file tree
Showing 62 changed files with 103 additions and 103 deletions.
2 changes: 1 addition & 1 deletion arch/cortex-m/src/systick.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! ARM Cortex-M SysTick peripheral.

use kernel;
use kernel::common::regs::{ReadOnly, ReadWrite};
use kernel::common::registers::{ReadOnly, ReadWrite};
use kernel::common::StaticRef;

#[repr(C)]
Expand Down
4 changes: 2 additions & 2 deletions boards/ek-tm4c1294xl/Cargo.lock

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

4 changes: 2 additions & 2 deletions boards/hail/Cargo.lock

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

4 changes: 2 additions & 2 deletions boards/imix/Cargo.lock

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

4 changes: 2 additions & 2 deletions boards/launchxl/Cargo.lock

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

4 changes: 2 additions & 2 deletions boards/nordic/nrf51dk/Cargo.lock

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

4 changes: 2 additions & 2 deletions boards/nordic/nrf52840dk/Cargo.lock

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

4 changes: 2 additions & 2 deletions boards/nordic/nrf52dk/Cargo.lock

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

2 changes: 1 addition & 1 deletion chips/cc26xx/src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use core::cell::Cell;
use core::ops::{Index, IndexMut};
use ioc;
use kernel::common::regs::{ReadWrite, WriteOnly};
use kernel::common::registers::{ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil;

Expand Down
2 changes: 1 addition & 1 deletion chips/cc26xx/src/ioc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Required to setup and configure IO pins to different modes - all depending on
//! usage (eg. UART, GPIO, etc). It is used internally.

use kernel::common::regs::ReadWrite;
use kernel::common::registers::ReadWrite;
use kernel::common::StaticRef;
use kernel::hil;

Expand Down
2 changes: 1 addition & 1 deletion chips/cc26xx/src/prcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! It also manages the clocks attached to almost every peripheral, which needs to
//! be enabled before usage.

use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;

#[repr(C)]
Expand Down
2 changes: 1 addition & 1 deletion chips/cc26xx/src/rtc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! RTC driver, sensortag family

use core::cell::Cell;
use kernel::common::regs::{ReadOnly, ReadWrite};
use kernel::common::registers::{ReadOnly, ReadWrite};
use kernel::common::StaticRef;
use kernel::hil::time::{self, Alarm, Frequency, Time};

Expand Down
2 changes: 1 addition & 1 deletion chips/cc26xx/src/trng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

use core::cell::Cell;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::rng;
use prcm;
Expand Down
2 changes: 1 addition & 1 deletion chips/cc26xx/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::cell::Cell;
use gpio;
use ioc;
use kernel;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::gpio::Pin;
use kernel::hil::uart;
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf51/src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use core::cell::Cell;
use core::cmp;
use kernel::common::cells::OptionalCell;
use kernel::common::cells::TakeCell;
use kernel::common::regs::{FieldValue, ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{FieldValue, ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::i2c;
use {nrf5x, nrf5x::gpio, nrf5x::pinmux::Pinmux};
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf51/src/uart.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::cell::Cell;
use kernel::common::cells::OptionalCell;
use kernel::common::cells::TakeCell;
use kernel::common::regs::{ReadWrite, WriteOnly};
use kernel::common::registers::{ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::uart;
use nrf5x::pinmux::Pinmux;
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/adc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! ADC driver for the nRF52. Uses the SAADC peripheral.

use kernel::common::cells::{OptionalCell, VolatileCell};
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil;
use kernel::ReturnCode;
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//!

use kernel::common::cells::OptionalCell;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;

#[repr(C)]
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/ficr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! - Date: November 27, 2017

use core::fmt;
use kernel::common::regs::ReadOnly;
use kernel::common::registers::ReadOnly;
use kernel::common::StaticRef;

const FICR_BASE: StaticRef<FicrRegisters> =
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use kernel::common::cells::OptionalCell;
use kernel::common::cells::TakeCell;
use kernel::common::cells::VolatileCell;
use kernel::common::regs::{ReadWrite, WriteOnly};
use kernel::common::registers::{ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil;
use nrf5x::pinmux::Pinmux;
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/nvmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use kernel::common::cells::OptionalCell;
use kernel::common::cells::TakeCell;
use kernel::common::cells::VolatileCell;
use kernel::common::deferred_call::DeferredCall;
use kernel::common::regs::{ReadOnly, ReadWrite};
use kernel::common::registers::{ReadOnly, ReadWrite};
use kernel::common::StaticRef;
use kernel::hil;
use kernel::ReturnCode;
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/ppi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
//! * Francine Mäkelä
//! * Date: May 04, 2018

use kernel::common::regs::{FieldValue, ReadWrite};
use kernel::common::registers::{FieldValue, ReadWrite};
use kernel::common::StaticRef;

const PPI_BASE: StaticRef<PpiRegisters> =
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/radio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use core::cell::Cell;
use core::convert::TryFrom;
use kernel;
use kernel::common::cells::OptionalCell;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::ble_advertising;
use kernel::hil::ble_advertising::RadioChannel;
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use core::cell::Cell;
use core::{cmp, ptr};
use kernel::common::cells::{OptionalCell, TakeCell, VolatileCell};
use kernel::common::regs::{ReadWrite, WriteOnly};
use kernel::common::registers::{ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil;
use kernel::ReturnCode;
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use core::cell::Cell;
use core::cmp::min;
use kernel;
use kernel::common::cells::OptionalCell;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use nrf5x::pinmux;

Expand Down
2 changes: 1 addition & 1 deletion chips/nrf52/src/uicr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! Minimal implementation to support activation of the reset button on
//! nRF52-DK.

use kernel::common::regs::ReadWrite;
use kernel::common::registers::ReadWrite;
use kernel::common::StaticRef;

const UICR_BASE: StaticRef<UicrRegisters> =
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf5x/src/aes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use core::cell::Cell;
use kernel;
use kernel::common::cells::OptionalCell;
use kernel::common::cells::TakeCell;
use kernel::common::regs::{ReadWrite, WriteOnly};
use kernel::common::registers::{ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::symmetric_encryption;
use kernel::ReturnCode;
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf5x/src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use core::cell::Cell;
use core::ops::{Index, IndexMut};
use kernel::common::cells::OptionalCell;
use kernel::common::regs::{FieldValue, ReadWrite};
use kernel::common::registers::{FieldValue, ReadWrite};
use kernel::common::StaticRef;
use kernel::hil;

Expand Down
2 changes: 1 addition & 1 deletion chips/nrf5x/src/rtc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! RTC driver, nRF5X-family

use kernel::common::cells::OptionalCell;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::time::{self, Alarm, Freq32KHz, Time};
use kernel::hil::Controller;
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf5x/src/temperature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use kernel;
use kernel::common::cells::OptionalCell;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;

const TEMP_BASE: StaticRef<TempRegisters> =
Expand Down
6 changes: 3 additions & 3 deletions chips/nrf5x/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//! * Date: August 18, 2016

use kernel::common::cells::OptionalCell;
use kernel::common::regs::{self, ReadWrite, WriteOnly};
use kernel::common::registers::{self, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil;

Expand Down Expand Up @@ -267,8 +267,8 @@ pub struct TimerAlarm {
// CC1 is used for compare/interrupts
const ALARM_CAPTURE: usize = 0;
const ALARM_COMPARE: usize = 1;
const ALARM_INTERRUPT_BIT: regs::Field<u32, Inte::Register> = Inte::COMPARE1;
const ALARM_INTERRUPT_BIT_SET: regs::FieldValue<u32, Inte::Register> = Inte::COMPARE1::SET;
const ALARM_INTERRUPT_BIT: registers::Field<u32, Inte::Register> = Inte::COMPARE1;
const ALARM_INTERRUPT_BIT_SET: registers::FieldValue<u32, Inte::Register> = Inte::COMPARE1::SET;

impl TimerAlarm {
const fn new(instance: usize) -> TimerAlarm {
Expand Down
2 changes: 1 addition & 1 deletion chips/nrf5x/src/trng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

use core::cell::Cell;
use kernel::common::cells::OptionalCell;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::rng::{self, Continue};

Expand Down
2 changes: 1 addition & 1 deletion chips/sam4l/src/adc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use core::{cmp, mem, slice};
use dma;
use kernel::common::cells::{OptionalCell, TakeCell};
use kernel::common::math;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil;
use kernel::ReturnCode;
Expand Down
2 changes: 1 addition & 1 deletion chips/sam4l/src/aes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use core::cell::Cell;
use kernel::common::cells::{OptionalCell, TakeCell};
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil;
use kernel::hil::symmetric_encryption::{AES128_BLOCK_SIZE, AES128_KEY_SIZE};
Expand Down
2 changes: 1 addition & 1 deletion chips/sam4l/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! - Date: July 16, 2015

use kernel::common::cells::OptionalCell;
use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::time::{self, Alarm, Freq16KHz, Time};
use kernel::hil::Controller;
Expand Down
2 changes: 1 addition & 1 deletion chips/sam4l/src/bpm.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Implementation of the BPM peripheral.

use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;

#[repr(C)]
Expand Down
2 changes: 1 addition & 1 deletion chips/sam4l/src/bscif.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Implementation of the Backup System Control Interface (BSCIF) peripheral.

use kernel::common::regs::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;

#[repr(C)]
Expand Down
Loading

0 comments on commit 646de24

Please sign in to comment.