1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* hardware.rs
*
* Developed by Tim Walls <tim.walls@snowgoons.com>
* Copyright (c) All Rights Reserved, Tim Walls
*/
//! Provides a single point of access to the hardware devices associated with
//! the AVR CPU on which we are running.
//!
//! This struct is your first port of call for accessing a pin, timer, or
//! any other hardware component which we have support for.
//!
//! It is implemented as a global singleton, a reference is obtained using
//! the provided instance() function. From here, you can then obtain
//! references to all the supported low-level hardware devices.
//!
//! # Example usage
//! ```rust
//! use avr_oxide::hal::atmega4809;
//!
//! fn use_hardware() {
//! let hardware = atmega328p::hardware::instance();
//!
//! // Get a reference to Port D
//! let portd = &hardware.portd;
//! }
//! ```
// Imports ===================================1================================
use atmega328p;
use mut_singleton;
// Declarations ==============================================================
// Code ======================================================================
mut_singleton!;