Skip to content

Commit 41ad1d5

Browse files
committed
Banish all warnings.
1 parent 1fe2cef commit 41ad1d5

File tree

6 files changed

+17
-5
lines changed

6 files changed

+17
-5
lines changed

tm4c-hal/src/delay.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Code for busy-waiting
2+
13
use crate::sysctl::Clocks;
24
use crate::time::Hertz;
35
use cast::u32;

tm4c-hal/src/gpio.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Code for GPIO pins
2+
13
use core::marker::PhantomData;
24

35
/// All unlocked pin modes implement this

tm4c-hal/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
//! Generic implementation code for both TM4C123 and TM4C129.
2+
13
#![no_std]
4+
#![deny(missing_docs)]
5+
#![deny(warnings)]
6+
#![allow(deprecated)]
27

38
pub mod bb;
49
pub mod delay;
@@ -7,7 +12,7 @@ pub mod serial;
712
pub mod sysctl;
813
pub mod time;
914

10-
// I can't work out how to put this macro in a module.
15+
///! An internal macro to implement the GPIO functionality for each port
1116
#[macro_export]
1217
macro_rules! gpio_macro {
1318
($chip_crate:ident, $GPIOX:ident, $gpiox:ident, $iopd:ident, $PXx:ident, [
@@ -460,6 +465,7 @@ macro_rules! gpio_macro {
460465
}
461466
}
462467

468+
///! An internal macro to implement the UART functionality for each peripheral
463469
#[macro_export]
464470
macro_rules! uart_hal_macro {
465471
($(
@@ -706,6 +712,7 @@ macro_rules! uart_hal_macro {
706712
}
707713
}
708714

715+
///! An internal macro to help define all the different pin typestates
709716
#[macro_export]
710717
macro_rules! uart_pin_macro {
711718
($UARTn:ident,

tm4c-hal/src/sysctl.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Code for the System Control module.
2+
13
use crate::time::Hertz;
24

35
/// Frozen clock frequencies

tm4c129x-hal/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
//!
2121
//! [`f3`]: https://docs.rs/f3/~0.5.1
2222
23-
// #![deny(missing_docs)]
24-
// #![deny(warnings)]
2523
#![no_std]
24+
#![deny(missing_docs)]
25+
#![deny(warnings)]
26+
#![allow(deprecated)]
2627

2728
pub use tm4c_hal::bb;
2829
pub use tm4c_hal::delay;

tm4c129x-hal/src/sysctl.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
use crate::bb;
2525
use crate::time::{Hertz, U32Ext};
2626
use cortex_m::asm::nop;
27-
use tm4c129x;
2827

2928
pub use tm4c_hal::sysctl::*;
3029

@@ -1009,7 +1008,6 @@ pub mod chip_id {
10091008
/// Read DID0 and DID1 to discover what sort of
10101009
/// TM4C129 this is.
10111010
pub fn get() -> Result<ChipId, Error> {
1012-
use tm4c129x;
10131011
// This is safe as it's read only
10141012
let p = unsafe { &*tm4c129x::SYSCTL::ptr() };
10151013
let did0 = p.did0.read();

0 commit comments

Comments
 (0)