From 1a5d0a59010e61ea38a9cbe16f180efc9bf6b7d2 Mon Sep 17 00:00:00 2001
From: schneider <schneider@blinkenlichts.net>
Date: Sat, 18 May 2019 21:01:03 +0200
Subject: [PATCH] fix(display): Update pin definitions

---
 ips/GUI_DEV/DEV_Config.h |  2 +-
 ips/LCD/LCD_Driver.c     |  4 ++--
 ips/main.c               | 10 +++++-----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ips/GUI_DEV/DEV_Config.h b/ips/GUI_DEV/DEV_Config.h
index 1abc980e..024feee3 100644
--- a/ips/GUI_DEV/DEV_Config.h
+++ b/ips/GUI_DEV/DEV_Config.h
@@ -46,7 +46,7 @@
 /**
  * GPIO config
 **/
-extern const gpio_cfg_t DEV_RST_PIN;
+//extern const gpio_cfg_t DEV_RST_PIN;
 extern const gpio_cfg_t DEV_DC_PIN;
 //extern const gpio_cfg_t DEV_CS_PIN;
 //extern const gpio_cfg_t DEV_BL_PIN;
diff --git a/ips/LCD/LCD_Driver.c b/ips/LCD/LCD_Driver.c
index 5c690cda..a868cb13 100644
--- a/ips/LCD/LCD_Driver.c
+++ b/ips/LCD/LCD_Driver.c
@@ -37,9 +37,9 @@ static void LCD_Reset(void)
 {
 	//DEV_Digital_Write(DEV_CS_PIN,0);
 	DEV_Delay_ms(20);
-	DEV_Digital_Write(DEV_RST_PIN,0);
+	//DEV_Digital_Write(DEV_RST_PIN,0);
 	DEV_Delay_ms(20);
-	DEV_Digital_Write(DEV_RST_PIN,1);
+	//DEV_Digital_Write(DEV_RST_PIN,1);
 	DEV_Delay_ms(20);
 }
 
diff --git a/ips/main.c b/ips/main.c
index 889b9592..f65f8d95 100644
--- a/ips/main.c
+++ b/ips/main.c
@@ -68,11 +68,11 @@
 
 // Parameters for PWM output
 #define PORT_PWM   PORT_0  // port
-#define PIN_PWM    PIN_21   // pin
+#define PIN_PWM    PIN_28   // pin
 #define FREQ       200 // (Hz) 
 //#define DUTY_CYCLE 75  // (%)  
 #define DUTY_CYCLE 20  // (%)  
-#define PWM_TIMER  MXC_TMR3  // must change PORT_PWM and PIN_PWM if changed
+#define PWM_TIMER  MXC_TMR4  // must change PORT_PWM and PIN_PWM if changed
 
 
 /***** Definitions *****/
@@ -84,8 +84,8 @@
 
 /***** Globals *****/
 static const gpio_cfg_t motor_pin = {PORT_0, PIN_8, GPIO_FUNC_OUT, GPIO_PAD_NONE};
-const gpio_cfg_t DEV_RST_PIN = {PORT_0, PIN_28, GPIO_FUNC_OUT, GPIO_PAD_NONE};
-const gpio_cfg_t DEV_DC_PIN = {PORT_0, PIN_23, GPIO_FUNC_OUT, GPIO_PAD_NONE};
+//const gpio_cfg_t DEV_RST_PIN = {PORT_0, PIN_28, GPIO_FUNC_OUT, GPIO_PAD_NONE};
+const gpio_cfg_t DEV_DC_PIN = {PORT_1, PIN_6, GPIO_FUNC_OUT, GPIO_PAD_NONE};
 
 /***** Functions *****/
 void PWM_Output()
@@ -174,7 +174,7 @@ int main(void)
         while (1);
     }
 
-    GPIO_Config(&DEV_RST_PIN);
+    //GPIO_Config(&DEV_RST_PIN);
     GPIO_Config(&DEV_DC_PIN);
 
     PWM_Output();
-- 
GitLab