summaryrefslogtreecommitdiffstatshomepage
path: root/stm
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-27 15:54:44 -0800
committerDamien George <damien.p.george@gmail.com>2014-01-27 15:54:44 -0800
commitc674f02d5c1deca3ed75763fb6261da5edb9ecbd (patch)
treeefb04acc4282e689737b9da5f3e2b8a2f59c13cf /stm
parentc7aa9fcae571a442a50c90409396788dd0b28c24 (diff)
parent8d3b0a9f74c39f5876b74a5829bddf0c0588276b (diff)
downloadmicropython-c674f02d5c1deca3ed75763fb6261da5edb9ecbd.tar.gz
micropython-c674f02d5c1deca3ed75763fb6261da5edb9ecbd.zip
Merge pull request #231 from iabdalkader/master
Fix implicit double conversion warning
Diffstat (limited to 'stm')
-rw-r--r--stm/lcd.c10
-rw-r--r--stm/printf.c3
2 files changed, 13 insertions, 0 deletions
diff --git a/stm/lcd.c b/stm/lcd.c
index dae4157a46..6f5019db1b 100644
--- a/stm/lcd.c
+++ b/stm/lcd.c
@@ -41,6 +41,16 @@
#define PYB_LCD_BL_PORT (GPIOB)
#define PYB_LCD_BL_PIN (GPIO_Pin_1) // Y12 = PB1
*/
+#elif defined(STM32F4DISC)
+/* Configure if needed */
+#define PYB_LCD_PORT (GPIOA)
+#define PYB_LCD_CS1_PIN (GPIO_Pin_2) // X3
+#define PYB_LCD_RST_PIN (GPIO_Pin_3) // X4
+#define PYB_LCD_A0_PIN (GPIO_Pin_4) // X5
+#define PYB_LCD_SCL_PIN (GPIO_Pin_5) // X6
+#define PYB_LCD_SI_PIN (GPIO_Pin_7) // X8
+#define PYB_LCD_BL_PORT (GPIOC)
+#define PYB_LCD_BL_PIN (GPIO_Pin_5) // X12
#endif
#define LCD_INSTR (0)
diff --git a/stm/printf.c b/stm/printf.c
index 82b168d1c4..2669a55344 100644
--- a/stm/printf.c
+++ b/stm/printf.c
@@ -6,6 +6,7 @@
#include "misc.h"
#include "systick.h"
#include "mpconfig.h"
+#include "mpconfigport.h"
#include "qstr.h"
#include "obj.h"
#include "lcd.h"
@@ -247,7 +248,9 @@ void stdout_print_strn(void *data, const char *str, unsigned int len) {
any = true;
}
if (!any) {
+#if MICROPY_HW_HAS_LCD
lcd_print_strn(str, len);
+#endif
}
}