Skip to content

Commit 1e2904c

Browse files
committed
Updated 'EVE' module to build correctly for both FT80x and FT81x
1 parent c9b9dd1 commit 1e2904c

File tree

10 files changed

+281
-183
lines changed

10 files changed

+281
-183
lines changed

MicroPython_BUILD/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ build/
2222

2323
patches/
2424

25+
*.id
2526
qstrdefs.generated.h
2627
/partitions_mpy.csv
2728
/sdkconfig

MicroPython_BUILD/BUILD.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
#=======================
5555
TOOLS_VER=ver20180827.id
56-
BUILD_VER=ver20180827.id
56+
BUILD_VER=ver20180904.id
5757
#=======================
5858

5959
# -----------------------------

MicroPython_BUILD/components/micropython/Kconfig.projbuild

+52-41
Original file line numberDiff line numberDiff line change
@@ -342,53 +342,64 @@ menu "MicroPython"
342342
bool "Enable support for EVE (FT8xx) displays"
343343
default n
344344
help
345-
Includes support for EVE displays (FT80x, FT81x)
345+
Include support for EVE displays (FT80x, FT81x)
346346

347-
menu "EVE Configuration"
347+
config MICROPY_EVE_IC_TYPE
348+
int
348349
depends on MICROPY_USE_EVE
349-
config MICROPY_EVE_FT81X
350-
bool "EVE FT81X type"
350+
default 0 if EVE_CHIP_TYPE0
351+
default 1 if EVE_CHIP_TYPE1
352+
353+
choice
354+
prompt "Select EVE IC type"
351355
depends on MICROPY_USE_EVE
352-
default y
356+
default EVE_CHIP_TYPE1
353357
help
354-
Used FT8xx chip is FT81x
355-
If not set, the code for FT80x will be compiled
358+
Select the EVE IC type, FT80x or FT81x
356359

357-
config EVE_MODE_TYPE
358-
int
359-
default 0 if FT8_USER_TYPE
360-
default 1 if FT8_FT810CB_HY50HD
361-
default 2 if FT8_FT811CB_HY50HD
362-
default 3 if FT8_VM800B35A
363-
default 4 if FT8_VM800B43A
364-
default 5 if FT8_VM800B50A
365-
default 6 if FT8_EVE2_50G
366-
default 6 if FT8_EVE2_TEST
360+
config EVE_CHIP_TYPE0
361+
bool "FT80x"
362+
config EVE_CHIP_TYPE1
363+
bool "FT81x"
364+
endchoice
367365

368-
choice
369-
prompt "Select predefined EVE display type"
370-
default EVE_MODE_TYPE1
371-
help
372-
Select predefined EVE display type
373-
374-
config FT8_USER_TYPE
375-
bool "User defined"
376-
config FT8_FT810CB_HY50HD
377-
bool "FT810CB-HY50HD: FT810 800x480 5\", HAOYU"
378-
config FT8_FT811CB_HY50HD
379-
bool "FT811CB-HY50HD: FT810 800x480 5\", HAOYU"
380-
config FT8_VM800B35A
381-
bool "VM800B35A: FT800 320x240 3.5\", FTDI"
382-
config FT8_VM800B43A
383-
bool "VM800B43A: FT800 480x272 4.4\", FTDI/BRT"
384-
config FT8_VM800B50A
385-
bool "VM800B50A: FT800 480x272 5\", FTDI/BRT"
386-
config FT8_EVE2_50G
387-
bool "800x480 5.0\" capacitive touch, FT813"
388-
config FT8_EVE2_TEST
389-
bool "TEST display"
390-
endchoice
391-
endmenu
366+
config EVE_MODE_TYPE
367+
int
368+
depends on MICROPY_USE_EVE
369+
default 0 if FT8_USER_TYPE
370+
default 1 if FT8_FT810CB_HY50HD
371+
default 2 if FT8_FT811CB_HY50HD
372+
default 3 if FT8_VM800B35A
373+
default 4 if FT8_VM800B43A
374+
default 5 if FT8_VM800B50A
375+
default 6 if FT8_EVE2_50G
376+
default 6 if FT8_EVE2_TEST
377+
378+
choice
379+
prompt "Select EVE display type"
380+
depends on MICROPY_USE_EVE
381+
default EVE_MODE_TYPE1
382+
help
383+
Select predefined EVE display type or user type
384+
If user type is selected, display configuration must be set using 'config' method
385+
386+
config FT8_USER_TYPE
387+
bool "User defined"
388+
config FT8_FT810CB_HY50HD
389+
bool "FT810CB-HY50HD: FT810 800x480 5\", HAOYU"
390+
config FT8_FT811CB_HY50HD
391+
bool "FT811CB-HY50HD: FT810 800x480 5\", HAOYU"
392+
config FT8_VM800B35A
393+
bool "VM800B35A: FT800 320x240 3.5\", FTDI"
394+
config FT8_VM800B43A
395+
bool "VM800B43A: FT800 480x272 4.4\", FTDI/BRT"
396+
config FT8_VM800B50A
397+
bool "VM800B50A: FT800 480x272 5\", FTDI/BRT"
398+
config FT8_EVE2_50G
399+
bool "800x480 5.0\" capacitive touch, FT813"
400+
config FT8_EVE2_TEST
401+
bool "TEST display"
402+
endchoice
392403

393404
config MICROPY_USE_GSM
394405
bool "Use GSM module"

MicroPython_BUILD/components/micropython/esp32/libs/eve/FT8.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,11 @@
421421
#define VERTEX2II(x,y,handle,cell) ((2UL<<30)|(((x)&511UL)<<21)|(((y)&511UL)<<12)|(((handle)&31UL)<<7)|(((cell)&127UL)<<0))
422422

423423

424+
#define REG_ID_FT81X 0x302000UL
425+
#define REG_ID_FT80X 0x102400UL
426+
424427
/* specific for FT80x */
425-
#ifndef FT8_81X_ENABLE
428+
#ifdef CONFIG_EVE_CHIP_TYPE0
426429

427430
#define FT8_CHIPID 0x00010008UL
428431

0 commit comments

Comments
 (0)