MVP Logo

Материализуя идеи

Не поднимешься в горы — не узнаешь высоты неба; не спустишься в бездну — не узнаешь толщи земли.

Recently I've implemented lightweight header library to encapsulate interfacing with FTDI EVE chip, namely, FT800, in templated OO manner.  It should compile in modern embedded x86/ARM toolchains, like ones Keil or C++ Builder have. 

The idea is as follows - while your core framework provides standard IO bus interface, like mine esfwxe, via EseChannel templated abstract facade, the rest is done in modular manner by EVE library classes.

Short "What is this?" list:

  1. EsFtEveCore.h - the chip-core template class, which is responsible for instantiation and exposing chip-specific types related to memory region constants, chip control registers, known control commands, and common IO bus functionality, like special nested RAII classes for scoped write and read, as well as simplified wrappers for N-byte read and write, and 'HOST' - flavoured commands (see FT EVE Programming guide).
  2. EsFtEvePlatform.h - template class standing for Platform (i.e. board) specific implementations, based on Core and Metrics types. While the Core was described above, the Metrics type should define LCD-specific constants, as follows (I used TM035KBH11 LCD panel with resistive touchpad): 
  3. The FT EVE have multiple co-processor engines on-board, like GPU, touchscreen, Audio, so for each engine, there is separate API template should be provided, if needed. If specific engine is not used in your project, specific dummy EsFtEveNullApi.h is provided with an empty class inside, which may be used as a stub template parameter.
  4. The final glue template class is defined EsFtEveHardware.h. It provides complete FT EVE hardware, which is built upon specific core, platform, GPU, and other APIs.
    /// Complete EVE hardware platform template
    template <
      typename EveCoreT,
      typename EvePlatformApiT,
      typename EveGpuApiT,
      typename EveAudioApiT,
      typename EveTouchApiT
    class EsFtEveHardware

Following is an example of how to "assemple" complete implementation for FTDI EVE FT800 chip. All FT800 API are used, so no NullApi include is necessary. Distinct FT800 - related definitions and APIs provided in files with FT800 suffixes. The IO bus concept is built using FTDI MPSSE upon EseChannel.h concept from my embedded library core. That's fine for PC-to-embedded tesbed, an may be wrapped around any bare-metal or RTOS-aware SPI driver.

The FTDI EVE headers are available for download here: 


Сейчас на сайте 10 гостей и нет пользователей

29.11.2021  ©2021 - ExactSoft - All rights reserved