From 43f91c2a8d97edb77df141c2bf43c6779b1a102d Mon Sep 17 00:00:00 2001 From: Roman Stepanov Date: Mon, 20 Feb 2017 18:17:56 +0300 Subject: [PATCH] started working on serial comms --- FlashDebug.jscript | 4 ++ Inc/ui.h | 10 ++- MKS-TFT32.ebp | 26 ++++++- MKS_TFT.jflash | 73 +++++++++++++++++++ Src/main.c | 94 +++++++++++++++++++++--- Src/serial_io.c | 76 ++++++++++++++++++++ Src/stm32f1xx_hal_msp.c | 100 +++++++++++++++++--------- Src/stm32f1xx_it.c | 46 +++++++++++- Src/ui.c | 153 +++++++++++++++++++++------------------- Src/usb_host.c | 14 ++-- 10 files changed, 469 insertions(+), 127 deletions(-) create mode 100644 FlashDebug.jscript create mode 100644 MKS_TFT.jflash create mode 100644 Src/serial_io.c diff --git a/FlashDebug.jscript b/FlashDebug.jscript new file mode 100644 index 0000000..dea9eb1 --- /dev/null +++ b/FlashDebug.jscript @@ -0,0 +1,4 @@ +h +loadbin bin\Debug\MKS-TFT32.hex, 0 +r +q diff --git a/Inc/ui.h b/Inc/ui.h index 6a9c93a..10e1970 100644 --- a/Inc/ui.h +++ b/Inc/ui.h @@ -66,16 +66,20 @@ typedef struct SDCARD_INSERT, SDCARD_REMOVE, USBDRIVE_INSERT, - USBDRIVE_REMOVE + USBDRIVE_REMOVE, + SHOW_STATUS } ucEventID; union { unsigned int touchXY; } ucData; -} xEvent_t; +} xUIEvent_t; extern QueueHandle_t xUIEventQueue; -typedef void (*volatile eventProcessor_t) (xEvent_t *); +#define MAXSTATSIZE 320/8 +extern uint8_t statString[MAXSTATSIZE+1]; + +typedef void (*volatile eventProcessor_t) (xUIEvent_t *); extern eventProcessor_t processEvent; typedef enum { diff --git a/MKS-TFT32.ebp b/MKS-TFT32.ebp index d7dc001..8a37257 100644 --- a/MKS-TFT32.ebp +++ b/MKS-TFT32.ebp @@ -36,6 +36,11 @@ + + + + +