From 9cab153acd3754f40a958a3c55fb4b46fa6dba6e Mon Sep 17 00:00:00 2001
From: schneider <schneider@blinkenlichts.net>
Date: Sun, 19 May 2019 23:33:19 +0200
Subject: [PATCH] fix(card10): Add card10 lib files to all projects
---
Hello_World/Makefile | 18 ++++++++++++++++++
Hello_World/main.c | 2 +-
bmatest/Makefile | 18 ++++++++++++++++++
bmetest/Makefile | 18 ++++++++++++++++++
imutest/Makefile | 18 ++++++++++++++++++
lib/gfx/Debug.h | 27 +++++++++++++++++++++++++++
lib/gfx/GUI_DEV/DEV_Config.c | 2 +-
7 files changed, 101 insertions(+), 2 deletions(-)
create mode 100644 lib/gfx/Debug.h
diff --git a/Hello_World/Makefile b/Hello_World/Makefile
index 184e192b..ddd64ae9 100644
--- a/Hello_World/Makefile
+++ b/Hello_World/Makefile
@@ -73,6 +73,13 @@ SRCS += bhy_support.c bhy_uc_driver.c bhy.c
SRCS += MAX77650-Arduino-Library.c
SRCS += bme680.h
SRCS += bma400.c
+SRCS += LCD_Driver.c
+SRCS += GUI_Paint.c
+SRCS += DEV_Config.c
+SRCS += font24.c
+SRCS += font24CN.c
+SRCS += card10.c
+SRCS += display.c
# Where to find source files for this test
@@ -97,6 +104,17 @@ VPATH += ../lib/bosch/BME680_driver
IPATH += ../lib/bosch/BMA400-API
VPATH += ../lib/bosch/BMA400-API
+IPATH += ../lib/gfx
+IPATH += ../lib/gfx/LCD
+IPATH += ../lib/gfx/GUI_DEV
+IPATH += ../lib/gfx/Fonts
+
+VPATH += ../lib/gfx
+VPATH += ../lib/gfx/LCD
+VPATH += ../lib/gfx/GUI_DEV
+VPATH += ../lib/gfx/Fonts
+
+
# Enable assertion checking for development
PROJ_CFLAGS+=-DMXC_ASSERT_ENABLE
diff --git a/Hello_World/main.c b/Hello_World/main.c
index ce6f2d42..4b6e6bda 100644
--- a/Hello_World/main.c
+++ b/Hello_World/main.c
@@ -53,7 +53,7 @@
/***** Definitions *****/
/***** Globals *****/
-//static const gpio_cfg_t motor_pin = {PORT_0, PIN_8, GPIO_FUNC_OUT, GPIO_PAD_NONE};
+static const gpio_cfg_t motor_pin = {PORT_0, PIN_8, GPIO_FUNC_OUT, GPIO_PAD_NONE};
/***** Functions *****/
// *****************************************************************************
diff --git a/bmatest/Makefile b/bmatest/Makefile
index 66cfc9f8..e2f676e6 100644
--- a/bmatest/Makefile
+++ b/bmatest/Makefile
@@ -75,7 +75,14 @@ SRCS += bhy_support.c bhy_uc_driver.c bhy.c
SRCS += MAX77650-Arduino-Library.c
SRCS += bme680.h
SRCS += bma400.c
+SRCS += LCD_Driver.c
+SRCS += GUI_Paint.c
+SRCS += DEV_Config.c
+SRCS += font24.c
+SRCS += font24CN.c
SRCS += card10.c
+SRCS += display.c
+
# Where to find source files for this test
VPATH = .
@@ -99,6 +106,17 @@ VPATH += ../lib/bosch/BME680_driver
IPATH += ../lib/bosch/BMA400-API
VPATH += ../lib/bosch/BMA400-API
+IPATH += ../lib/gfx
+IPATH += ../lib/gfx/LCD
+IPATH += ../lib/gfx/GUI_DEV
+IPATH += ../lib/gfx/Fonts
+
+VPATH += ../lib/gfx
+VPATH += ../lib/gfx/LCD
+VPATH += ../lib/gfx/GUI_DEV
+VPATH += ../lib/gfx/Fonts
+
+
# Enable assertion checking for development
PROJ_CFLAGS+=-DMXC_ASSERT_ENABLE
diff --git a/bmetest/Makefile b/bmetest/Makefile
index 66cfc9f8..e2f676e6 100644
--- a/bmetest/Makefile
+++ b/bmetest/Makefile
@@ -75,7 +75,14 @@ SRCS += bhy_support.c bhy_uc_driver.c bhy.c
SRCS += MAX77650-Arduino-Library.c
SRCS += bme680.h
SRCS += bma400.c
+SRCS += LCD_Driver.c
+SRCS += GUI_Paint.c
+SRCS += DEV_Config.c
+SRCS += font24.c
+SRCS += font24CN.c
SRCS += card10.c
+SRCS += display.c
+
# Where to find source files for this test
VPATH = .
@@ -99,6 +106,17 @@ VPATH += ../lib/bosch/BME680_driver
IPATH += ../lib/bosch/BMA400-API
VPATH += ../lib/bosch/BMA400-API
+IPATH += ../lib/gfx
+IPATH += ../lib/gfx/LCD
+IPATH += ../lib/gfx/GUI_DEV
+IPATH += ../lib/gfx/Fonts
+
+VPATH += ../lib/gfx
+VPATH += ../lib/gfx/LCD
+VPATH += ../lib/gfx/GUI_DEV
+VPATH += ../lib/gfx/Fonts
+
+
# Enable assertion checking for development
PROJ_CFLAGS+=-DMXC_ASSERT_ENABLE
diff --git a/imutest/Makefile b/imutest/Makefile
index 66cfc9f8..e2f676e6 100644
--- a/imutest/Makefile
+++ b/imutest/Makefile
@@ -75,7 +75,14 @@ SRCS += bhy_support.c bhy_uc_driver.c bhy.c
SRCS += MAX77650-Arduino-Library.c
SRCS += bme680.h
SRCS += bma400.c
+SRCS += LCD_Driver.c
+SRCS += GUI_Paint.c
+SRCS += DEV_Config.c
+SRCS += font24.c
+SRCS += font24CN.c
SRCS += card10.c
+SRCS += display.c
+
# Where to find source files for this test
VPATH = .
@@ -99,6 +106,17 @@ VPATH += ../lib/bosch/BME680_driver
IPATH += ../lib/bosch/BMA400-API
VPATH += ../lib/bosch/BMA400-API
+IPATH += ../lib/gfx
+IPATH += ../lib/gfx/LCD
+IPATH += ../lib/gfx/GUI_DEV
+IPATH += ../lib/gfx/Fonts
+
+VPATH += ../lib/gfx
+VPATH += ../lib/gfx/LCD
+VPATH += ../lib/gfx/GUI_DEV
+VPATH += ../lib/gfx/Fonts
+
+
# Enable assertion checking for development
PROJ_CFLAGS+=-DMXC_ASSERT_ENABLE
diff --git a/lib/gfx/Debug.h b/lib/gfx/Debug.h
new file mode 100644
index 00000000..1dd58cba
--- /dev/null
+++ b/lib/gfx/Debug.h
@@ -0,0 +1,27 @@
+/*****************************************************************************
+* | File : Debug.h
+* | Author : Waveshare team
+* | Function : debug with prntf
+* | Info :
+* Image scanning
+* Please use progressive scanning to generate images or fonts
+*----------------
+* | This version: V1.0
+* | Date : 2018-01-11
+* | Info : Basic version
+*
+******************************************************************************/
+#ifndef __DEBUG_H
+#define __DEBUG_H
+
+#include "stdio.h"
+
+#define DEV_DEBUG 1
+#if DEV_DEBUG
+ #define Debug(__info,...) printf("Debug : " __info,##__VA_ARGS__)
+#else
+ #define DEBUG(__info,...)
+#endif
+
+#endif
+
diff --git a/lib/gfx/GUI_DEV/DEV_Config.c b/lib/gfx/GUI_DEV/DEV_Config.c
index 328292ef..e38cfc6d 100644
--- a/lib/gfx/GUI_DEV/DEV_Config.c
+++ b/lib/gfx/GUI_DEV/DEV_Config.c
@@ -42,7 +42,7 @@ void lcd_write(uint8_t *data, int size)
{
spi_req_t req;
//uint8_t tx_data[] = {data};
- uint8_t rx_data[] = {0};
+ //uint8_t rx_data[] = {0};
//req.tx_data = tx_data;
req.tx_data = data;
//req.rx_data = rx_data;
--
GitLab