Move CorrectedRgb into crate root & rename it to HardwareRgb
This commit is contained in:
parent
1614184575
commit
4f08a72d70
3 changed files with 14 additions and 13 deletions
gemma_m0_lights/src
|
@ -15,11 +15,11 @@ use hal::{
|
|||
Peripherals
|
||||
};
|
||||
use lights::{
|
||||
gamma::CorrectedRgb,
|
||||
HardwareRgb,
|
||||
Lights
|
||||
};
|
||||
|
||||
pub fn boot() -> impl Lights<Pixel = CorrectedRgb> {
|
||||
pub fn boot() -> impl Lights<Pixel = HardwareRgb> {
|
||||
let mut peripherals = Peripherals::take().unwrap();
|
||||
let _clock = GenericClockController::with_internal_32kosc(
|
||||
peripherals.GCLK,
|
||||
|
@ -69,10 +69,10 @@ impl<T: OutputPin> NeopixelLights<T> {
|
|||
}
|
||||
|
||||
impl<T: OutputPin> Lights for NeopixelLights<T> {
|
||||
type Pixel = CorrectedRgb;
|
||||
type Pixel = HardwareRgb;
|
||||
|
||||
#[inline]
|
||||
fn render(&mut self, rgb: &CorrectedRgb) {
|
||||
fn render(&mut self, rgb: &HardwareRgb) {
|
||||
// GRB pixel order
|
||||
self.byte(rgb.1);
|
||||
self.byte(rgb.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue