-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from SteelPh0enix/samv71-get-system-time
ROS#138 - Implementation of `get_system_time` and an example
- Loading branch information
Showing
15 changed files
with
405 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
//! Module representing peripherals internally used by Aerugo. | ||
|
||
use crate::drivers::watchdog::Watchdog; | ||
use pac::{PMC, TC0}; | ||
|
||
use crate::drivers::{ | ||
timer::{Ch0, Ch1, Ch2, Channel, Timer, Waveform}, | ||
watchdog::Watchdog, | ||
}; | ||
|
||
/// System peripherals structure. These peripherals are represented as HAL drivers. | ||
/// They are initialized on system init, and used directly by HAL to provide core functionality. | ||
pub struct SystemPeripherals { | ||
/// Watchdog instance. | ||
pub watchdog: Watchdog, | ||
/// Timer instance. | ||
pub timer: Timer<TC0>, | ||
/// Timer's channel 0 instance. | ||
pub timer_ch0: Option<Channel<TC0, Ch0, Waveform>>, | ||
/// Timer's channel 1 instance. | ||
pub timer_ch1: Option<Channel<TC0, Ch1, Waveform>>, | ||
/// Timer's channel 2 instance. | ||
pub timer_ch2: Option<Channel<TC0, Ch2, Waveform>>, | ||
/// PMC instance. This will be stored only temporarily here, between HAL init and system config | ||
pub pmc: Option<PMC>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.