Lcd companion boards support (VKLCD50RTA & VKLCD70RT)

What is this ?

This is a demo program using Renesas RGA library & USB Camera to demonstrate VK-RZ/A1H's companion boards workability.


Supported companion Boards:

VKLCD50RTA

/media/uploads/tvendov/front_view_hmi_50.png /media/uploads/tvendov/side_view_hmi_50.png

VKLCD70RT

/media/uploads/tvendov/front_view_hmi_70.png/media/uploads/tvendov/side_view_hmi_70.png /media/uploads/tvendov/front_view_lvds.png/media/uploads/tvendov/back_view_lvds.png


How to Configure ?

You can choose which display is installed by altering the lcd_panel.h file

Leave the active one & comment out the others:

#define     LCD_VDC5_CH0_PANEL                  LCD_CH0_PANEL_VKLCD50RTA
//#define     LCD_VDC5_CH0_PANEL                  LCD_CH0_PANEL_VKLCD70RT

You can alter the whole demo with your pictures if you like:


How to compile ?

  • The Demo can be compiled in 3 modes:
    • I. Execution from the internal 10-MB on-chip SRAM.
      • After import in the online compiler just leave only the VKRZA1H_RAM.sct & delete all others linker files in the TOOLCHAIN_ARM_STD folder.
      • Save the result binary in the SD Card (<SD>:\vkrza1\lcd_sample ), altering vkrza1h.ini by this way
    • II. Execution from the on-board serial FALSH in dual (32-MB) mode.
      • After import in the online compiler just leave only the VKRZA1H_DOUBLE.sct & delete all others linker files in the TOOLCHAIN_ARM_STD folder.
      • Drag & drop the result binary in MBED disk, (previously inited in double flash mode)
    • III. Execution from the on-board serial FALSH in single (16-MB) mode.
      • After import in the online compiler just leave only the VKRZA1H_SINGLE.sct & delete all others linker files in the TOOLCHAIN_ARM_STD folder.
      • Drag & drop the result binary in MBED disk, (previously inited in single flash mode )

Quick presentation:


Other demos ?

More demos you can find on our FTP

Committer:
tvendov
Date:
Thu Feb 16 10:23:48 2017 +0000
Revision:
0:6435b67ad23c
Initial lcd support (VKLCD50RTA & VKLCD70RT companion boards)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tvendov 0:6435b67ad23c 1 /* mbed Microcontroller Library
tvendov 0:6435b67ad23c 2 * Copyright (c) 2006-2013 ARM Limited
tvendov 0:6435b67ad23c 3 *
tvendov 0:6435b67ad23c 4 * Licensed under the Apache License, Version 2.0 (the "License");
tvendov 0:6435b67ad23c 5 * you may not use this file except in compliance with the License.
tvendov 0:6435b67ad23c 6 * You may obtain a copy of the License at
tvendov 0:6435b67ad23c 7 *
tvendov 0:6435b67ad23c 8 * http://www.apache.org/licenses/LICENSE-2.0
tvendov 0:6435b67ad23c 9 *
tvendov 0:6435b67ad23c 10 * Unless required by applicable law or agreed to in writing, software
tvendov 0:6435b67ad23c 11 * distributed under the License is distributed on an "AS IS" BASIS,
tvendov 0:6435b67ad23c 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tvendov 0:6435b67ad23c 13 * See the License for the specific language governing permissions and
tvendov 0:6435b67ad23c 14 * limitations under the License.
tvendov 0:6435b67ad23c 15 */
tvendov 0:6435b67ad23c 16 #include "FileSystemLike.h"
tvendov 0:6435b67ad23c 17
tvendov 0:6435b67ad23c 18 namespace mbed {
tvendov 0:6435b67ad23c 19
tvendov 0:6435b67ad23c 20 class BaseDirHandle : public DirHandle {
tvendov 0:6435b67ad23c 21 public:
tvendov 0:6435b67ad23c 22 /*
tvendov 0:6435b67ad23c 23 We keep track of our current location as the n'th object in the
tvendov 0:6435b67ad23c 24 FileSystemLike list. Using a Base* instead would cause problems if that
tvendov 0:6435b67ad23c 25 object were to be destroyed between readdirs.
tvendov 0:6435b67ad23c 26 Using this method does mean though that destroying/creating objects can
tvendov 0:6435b67ad23c 27 give unusual results from readdir.
tvendov 0:6435b67ad23c 28 */
tvendov 0:6435b67ad23c 29 off_t n;
tvendov 0:6435b67ad23c 30 struct dirent cur_entry;
tvendov 0:6435b67ad23c 31
tvendov 0:6435b67ad23c 32 BaseDirHandle() : n(0), cur_entry() {
tvendov 0:6435b67ad23c 33 }
tvendov 0:6435b67ad23c 34
tvendov 0:6435b67ad23c 35 virtual int closedir() {
tvendov 0:6435b67ad23c 36 // No lock can be used in destructor
tvendov 0:6435b67ad23c 37 delete this;
tvendov 0:6435b67ad23c 38 return 0;
tvendov 0:6435b67ad23c 39 }
tvendov 0:6435b67ad23c 40
tvendov 0:6435b67ad23c 41 virtual struct dirent *readdir() {
tvendov 0:6435b67ad23c 42 lock();
tvendov 0:6435b67ad23c 43 FileBase *ptr = FileBase::get(n);
tvendov 0:6435b67ad23c 44 if (ptr == NULL) {
tvendov 0:6435b67ad23c 45 unlock();
tvendov 0:6435b67ad23c 46 return NULL;
tvendov 0:6435b67ad23c 47 }
tvendov 0:6435b67ad23c 48
tvendov 0:6435b67ad23c 49 /* Increment n, so next readdir gets the next item */
tvendov 0:6435b67ad23c 50 n++;
tvendov 0:6435b67ad23c 51
tvendov 0:6435b67ad23c 52 /* Setup cur entry and return a pointer to it */
tvendov 0:6435b67ad23c 53 std::strncpy(cur_entry.d_name, ptr->getName(), NAME_MAX);
tvendov 0:6435b67ad23c 54 unlock();
tvendov 0:6435b67ad23c 55 return &cur_entry;
tvendov 0:6435b67ad23c 56 }
tvendov 0:6435b67ad23c 57
tvendov 0:6435b67ad23c 58 virtual off_t telldir() {
tvendov 0:6435b67ad23c 59 lock();
tvendov 0:6435b67ad23c 60 off_t offset = n;
tvendov 0:6435b67ad23c 61 unlock();
tvendov 0:6435b67ad23c 62 return offset;
tvendov 0:6435b67ad23c 63 }
tvendov 0:6435b67ad23c 64
tvendov 0:6435b67ad23c 65 virtual void seekdir(off_t offset) {
tvendov 0:6435b67ad23c 66 lock();
tvendov 0:6435b67ad23c 67 n = offset;
tvendov 0:6435b67ad23c 68 unlock();
tvendov 0:6435b67ad23c 69 }
tvendov 0:6435b67ad23c 70
tvendov 0:6435b67ad23c 71 virtual void rewinddir() {
tvendov 0:6435b67ad23c 72 lock();
tvendov 0:6435b67ad23c 73 n = 0;
tvendov 0:6435b67ad23c 74 unlock();
tvendov 0:6435b67ad23c 75 }
tvendov 0:6435b67ad23c 76
tvendov 0:6435b67ad23c 77 protected:
tvendov 0:6435b67ad23c 78 PlatformMutex _mutex;
tvendov 0:6435b67ad23c 79
tvendov 0:6435b67ad23c 80 virtual void lock() {
tvendov 0:6435b67ad23c 81 _mutex.lock();
tvendov 0:6435b67ad23c 82 }
tvendov 0:6435b67ad23c 83
tvendov 0:6435b67ad23c 84 virtual void unlock() {
tvendov 0:6435b67ad23c 85 _mutex.unlock();
tvendov 0:6435b67ad23c 86 }
tvendov 0:6435b67ad23c 87 };
tvendov 0:6435b67ad23c 88
tvendov 0:6435b67ad23c 89 FileSystemLike::FileSystemLike(const char *name) : FileBase(name, FileSystemPathType) {
tvendov 0:6435b67ad23c 90
tvendov 0:6435b67ad23c 91 }
tvendov 0:6435b67ad23c 92
tvendov 0:6435b67ad23c 93 FileSystemLike::~FileSystemLike() {
tvendov 0:6435b67ad23c 94
tvendov 0:6435b67ad23c 95 }
tvendov 0:6435b67ad23c 96
tvendov 0:6435b67ad23c 97 DirHandle *FileSystemLike::opendir() {
tvendov 0:6435b67ad23c 98 return new BaseDirHandle();
tvendov 0:6435b67ad23c 99 }
tvendov 0:6435b67ad23c 100
tvendov 0:6435b67ad23c 101 } // namespace mbed
tvendov 0:6435b67ad23c 102