daisy 0.11.0

A board support package for the Electro-Smith Daisy Seed and Patch SM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Simple abstraction of the on-board status LED.

use crate::hal::gpio::{self, PinMode};

pub type LedUser = gpio::gpioc::PC7<gpio::Output<gpio::PushPull>>;

#[allow(non_snake_case)]
pub struct Leds {
    pub USER: LedUser,
}

impl Leds {
    pub fn new<MODE: PinMode>(user_pin: gpio::gpioc::PC7<MODE>) -> Self {
        Self {
            USER: user_pin.into_push_pull_output(),
        }
    }
}