Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Commit

Permalink
Added more apidocs
Browse files Browse the repository at this point in the history
  • Loading branch information
farcaller committed Jul 13, 2015
1 parent 7bcc4d5 commit e6d088d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hal/lpc11xx/syscon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ use super::regs;
/// Interrupt vectors source.
#[derive(PartialEq, Debug)]
pub enum ISRLocation {
/// ISR mapped to bootloader.
Bootloader = 0,
/// ISR mapped to RAM.
RAM = 1,
/// ISR mapped to Flash ROM.
Flash = 2
}

Expand All @@ -48,9 +51,13 @@ pub fn set_isr_location(loc: ISRLocation) {

/// Peripherals that are soft-resettable via reset_peripheral.
pub enum ResetPeripheral {
/// Reset SPI0.
SPI0,
/// Reset SPI1.
SPI1,
/// Reset I2C.
I2C,
/// Reset CAN.
CAN,
}

Expand Down Expand Up @@ -84,6 +91,7 @@ pub unsafe fn reset_peripheral(peripheral: ResetPeripheral) {
}
}

/// Initialises system clock to specified boot configuration.
pub fn init_system_clock() {
regs::SYSCON().pdruncfg
.set_sysosc_pd(regs::SYSCON_pdruncfg_sysosc_pd::POWERED);
Expand Down

0 comments on commit e6d088d

Please sign in to comment.