From 13771bf7700f475bf66333ac228c14302a9190f1 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 13 Nov 2019 20:13:57 +0100 Subject: [PATCH] tec: fix wrong SHDN pins --- firmware/src/board/gpio.rs | 8 ++++---- firmware/src/tec.rs | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/firmware/src/board/gpio.rs b/firmware/src/board/gpio.rs index 9728915..37628b1 100644 --- a/firmware/src/board/gpio.rs +++ b/firmware/src/board/gpio.rs @@ -72,7 +72,7 @@ pub struct PE4; def_gpio!(GPIO_PORTE_AHB, PE4, 4); pub struct PE5; def_gpio!(GPIO_PORTE_AHB, PE5, 5); -pub struct PP4; -def_gpio!(GPIO_PORTP, PP4, 4); -pub struct PP5; -def_gpio!(GPIO_PORTP, PP5, 5); +pub struct PP2; +def_gpio!(GPIO_PORTP, PP2, 2); +pub struct PP3; +def_gpio!(GPIO_PORTP, PP3, 3); diff --git a/firmware/src/tec.rs b/firmware/src/tec.rs index 3e7d7e9..ab4653d 100644 --- a/firmware/src/tec.rs +++ b/firmware/src/tec.rs @@ -1,6 +1,6 @@ use core::fmt; use crate::board::pwm::{self, PwmChannel, PwmPeripheral}; -use crate::board::gpio::{Gpio, GpioOutput, PP4, PP5}; +use crate::board::gpio::{Gpio, GpioOutput, PP2, PP3}; use embedded_hal::digital::v2::OutputPin; #[derive(Clone, Copy, Debug)] @@ -56,20 +56,20 @@ pub struct Tec> { +impl Tec> { pub fn tec0() -> Self { let (max_i_pos, max_i_neg) = tm4c129x::TIMER2::split(); let (i_set, max_v) = tm4c129x::TIMER3::split(); - let shdn = setup_shdn(PP4); + let shdn = setup_shdn(PP2); Tec { max_i_pos, max_i_neg, i_set, max_v, shdn } } } -impl Tec> { +impl Tec> { pub fn tec1() -> Self { let (max_i_pos, max_i_neg) = tm4c129x::TIMER4::split(); let (i_set, max_v) = tm4c129x::TIMER5::split(); - let shdn = setup_shdn(PP5); + let shdn = setup_shdn(PP3); Tec { max_i_pos, max_i_neg, i_set, max_v, shdn } } }