[bsp] add LCD and touch driver, and update configuration

This commit is contained in:
tanek liang committed 2017-12-15 16:31:44 +08:00
1 parent f1c6dc1a4d
commit 59ea0e16be
8 files changed
+1419 -17

No files matched your search

+27 -8
View File
@@ -93,11 +93,11 @@ CONFIG_RT_USING_DFS_ELMFAT=y
#
CONFIG_RT_DFS_ELM_CODE_PAGE=437
CONFIG_RT_DFS_ELM_WORD_ACCESS=y
CONFIG_RT_DFS_ELM_USE_LFN_0=y
# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_3 is not set
CONFIG_RT_DFS_ELM_USE_LFN=0
CONFIG_RT_DFS_ELM_USE_LFN_3=y
CONFIG_RT_DFS_ELM_USE_LFN=3
CONFIG_RT_DFS_ELM_MAX_LFN=255
CONFIG_RT_DFS_ELM_DRIVES=2
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=512
@@ -117,7 +117,8 @@ CONFIG_RT_USING_DEVICE_IPC=y
CONFIG_RT_USING_SERIAL=y
# CONFIG_RT_USING_CAN is not set
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_I2C is not set
CONFIG_RT_USING_I2C=y
CONFIG_RT_USING_I2C_BITOPS=y
# CONFIG_RT_USING_PIN is not set
# CONFIG_RT_USING_MTD_NOR is not set
# CONFIG_RT_USING_MTD_NAND is not set
@@ -157,7 +158,6 @@ CONFIG_RT_LWIP_DNS=y
CONFIG_RT_LWIP_DHCP=y
CONFIG_IP_SOF_BROADCAST=1
CONFIG_IP_SOF_BROADCAST_RECV=1
# CONFIG_LWIP_USING_DHCPD is not set
#
# Static IPv4 Address
@@ -169,8 +169,7 @@ CONFIG_RT_LWIP_UDP=y
CONFIG_RT_LWIP_TCP=y
# CONFIG_RT_LWIP_RAW is not set
# CONFIG_RT_LWIP_PPP is not set
# CONFIG_RT_LWIP_PPPOE is not set
# CONFIG_RT_LWIP_PPPOS is not set
CONFIG_RT_MEMP_NUM_NETCONN=8
CONFIG_RT_LWIP_PBUF_NUM=16
CONFIG_RT_LWIP_RAW_PCB_NUM=4
CONFIG_RT_LWIP_UDP_PCB_NUM=4
@@ -195,12 +194,29 @@ CONFIG_LWIP_SO_RCVBUF=1
# Modbus master and slave stack
#
# CONFIG_RT_USING_MODBUS is not set
# CONFIG_LWIP_USING_DHCPD is not set
# CONFIG_RT_USING_NETUTILS is not set
#
# RT-Thread UI Engine
#
# CONFIG_RT_USING_GUIENGINE is not set
CONFIG_RT_USING_GUIENGINE=y
CONFIG_RTGUI_NAME_MAX=16
CONFIG_RTGUI_USING_TTF=y
CONFIG_UTF8_TO_UNICODE=y
CONFIG_RTGUI_USING_FONT16=y
CONFIG_RTGUI_USING_FONT12=y
# CONFIG_RTGUI_USING_FONTHZ is not set
# CONFIG_RTGUI_IMAGE_XPM is not set
CONFIG_RTGUI_IMAGE_JPEG_NONE=y
# CONFIG_RTGUI_IMAGE_JPEG is not set
# CONFIG_RTGUI_IMAGE_TJPGD is not set
# CONFIG_RTGUI_IMAGE_PNG_NONE is not set
# CONFIG_RTGUI_IMAGE_PNG is not set
CONFIG_RTGUI_IMAGE_LODEPNG=y
# CONFIG_RTGUI_IMAGE_BMP is not set
CONFIG_RTGUI_IMAGE_CONTAINER=y
# CONFIG_RTGUI_USING_DEMO is not set
#
# VBUS(Virtual Software BUS)
@@ -240,6 +256,7 @@ CONFIG_LWIP_SO_RCVBUF=1
#
# CONFIG_PKG_USING_MBEDTLS is not set
# CONFIG_PKG_USING_libsodium is not set
# CONFIG_PKG_USING_TINYCRYPT is not set
#
# language packages
@@ -250,6 +267,7 @@ CONFIG_LWIP_SO_RCVBUF=1
#
# multimedia packages
#
# CONFIG_PKG_USING_OPENMV is not set
#
# tools packages
@@ -257,6 +275,7 @@ CONFIG_LWIP_SO_RCVBUF=1
# CONFIG_PKG_USING_CMBACKTRACE is not set
# CONFIG_PKG_USING_EASYLOGGER is not set
# CONFIG_PKG_USING_SYSTEMVIEW is not set
# CONFIG_PKG_USING_IPERF is not set
#
# miscellaneous packages
+3
View File
@@ -21,6 +21,9 @@ if GetDepend('RT_USING_LWIP'):
if GetDepend('RT_USING_SDIO'):
src += ['drv_sdio.c']
if GetDepend('RT_USING_RTGUI') or GetDepend('RT_USING_GUIENGINE'):
src += ['drv_lcd.c', 'drv_ft5406.c', 'drv_i2c.c']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
+20 -1
View File
@@ -173,7 +173,6 @@ void rt_hw_board_init()
{
BOARD_BootClockRUN();
SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND);
#ifdef RT_USING_COMPONENTS_INIT
@@ -193,4 +192,24 @@ void rt_hw_board_init()
#endif
}
#ifdef RT_USING_GUIENGINE
#include <rtgui/driver.h>
#include "drv_lcd.h"
/* initialize for gui driver */
int rtgui_lcd_init(void)
{
rt_device_t device;
imxrt_hw_lcd_init();
device = rt_device_find("lcd");
/* set graphic device */
rtgui_graphic_set_device(device);
return 0;
}
INIT_DEVICE_EXPORT(rtgui_lcd_init);
#endif
/*@}*/
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+29
View File
@@ -0,0 +1,29 @@
/*
* File : drv_i2c.c
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2017-12-15 Tanek the first version
*/
#ifndef __DRV_LCD_H__
#define __DRV_LCD_H__
extern int imxrt_hw_lcd_init(void);
#endif
+28 -8
View File
@@ -85,11 +85,11 @@
#define RT_DFS_ELM_CODE_PAGE 437
#define RT_DFS_ELM_WORD_ACCESS
#define RT_DFS_ELM_USE_LFN_0
/* RT_DFS_ELM_USE_LFN_0 is not set */
/* RT_DFS_ELM_USE_LFN_1 is not set */
/* RT_DFS_ELM_USE_LFN_2 is not set */
/* RT_DFS_ELM_USE_LFN_3 is not set */
#define RT_DFS_ELM_USE_LFN 0
#define RT_DFS_ELM_USE_LFN_3
#define RT_DFS_ELM_USE_LFN 3
#define RT_DFS_ELM_MAX_LFN 255
#define RT_DFS_ELM_DRIVES 2
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
@@ -108,7 +108,8 @@
#define RT_USING_SERIAL
/* RT_USING_CAN is not set */
/* RT_USING_HWTIMER is not set */
/* RT_USING_I2C is not set */
#define RT_USING_I2C
#define RT_USING_I2C_BITOPS
/* RT_USING_PIN is not set */
/* RT_USING_MTD_NOR is not set */
/* RT_USING_MTD_NAND is not set */
@@ -143,7 +144,6 @@
#define RT_LWIP_DHCP
#define IP_SOF_BROADCAST 1
#define IP_SOF_BROADCAST_RECV 1
/* LWIP_USING_DHCPD is not set */
/* Static IPv4 Address */
@@ -154,8 +154,7 @@
#define RT_LWIP_TCP
/* RT_LWIP_RAW is not set */
/* RT_LWIP_PPP is not set */
/* RT_LWIP_PPPOE is not set */
/* RT_LWIP_PPPOS is not set */
#define RT_MEMP_NUM_NETCONN 8
#define RT_LWIP_PBUF_NUM 16
#define RT_LWIP_RAW_PCB_NUM 4
#define RT_LWIP_UDP_PCB_NUM 4
@@ -179,11 +178,28 @@
/* Modbus master and slave stack */
/* RT_USING_MODBUS is not set */
/* LWIP_USING_DHCPD is not set */
/* RT_USING_NETUTILS is not set */
/* RT-Thread UI Engine */
/* RT_USING_GUIENGINE is not set */
#define RT_USING_GUIENGINE
#define RTGUI_NAME_MAX 16
#define RTGUI_USING_TTF
#define UTF8_TO_UNICODE
#define RTGUI_USING_FONT16
#define RTGUI_USING_FONT12
/* RTGUI_USING_FONTHZ is not set */
/* RTGUI_IMAGE_XPM is not set */
#define RTGUI_IMAGE_JPEG_NONE
/* RTGUI_IMAGE_JPEG is not set */
/* RTGUI_IMAGE_TJPGD is not set */
/* RTGUI_IMAGE_PNG_NONE is not set */
/* RTGUI_IMAGE_PNG is not set */
#define RTGUI_IMAGE_LODEPNG
/* RTGUI_IMAGE_BMP is not set */
#define RTGUI_IMAGE_CONTAINER
/* RTGUI_USING_DEMO is not set */
/* VBUS(Virtual Software BUS) */
@@ -216,6 +232,7 @@
/* PKG_USING_MBEDTLS is not set */
/* PKG_USING_libsodium is not set */
/* PKG_USING_TINYCRYPT is not set */
/* language packages */
@@ -224,11 +241,14 @@
/* multimedia packages */
/* PKG_USING_OPENMV is not set */
/* tools packages */
/* PKG_USING_CMBACKTRACE is not set */
/* PKG_USING_EASYLOGGER is not set */
/* PKG_USING_SYSTEMVIEW is not set */
/* PKG_USING_IPERF is not set */
/* miscellaneous packages */