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 #ifndef MBED_ETHERNET_H
tvendov 0:6435b67ad23c 17 #define MBED_ETHERNET_H
tvendov 0:6435b67ad23c 18
tvendov 0:6435b67ad23c 19 #include "platform.h"
tvendov 0:6435b67ad23c 20
tvendov 0:6435b67ad23c 21 #if DEVICE_ETHERNET
tvendov 0:6435b67ad23c 22
tvendov 0:6435b67ad23c 23 namespace mbed {
tvendov 0:6435b67ad23c 24
tvendov 0:6435b67ad23c 25 /** An ethernet interface, to use with the ethernet pins.
tvendov 0:6435b67ad23c 26 *
tvendov 0:6435b67ad23c 27 * @Note Synchronization level: Not protected
tvendov 0:6435b67ad23c 28 *
tvendov 0:6435b67ad23c 29 * Example:
tvendov 0:6435b67ad23c 30 * @code
tvendov 0:6435b67ad23c 31 * // Read destination and source from every ethernet packet
tvendov 0:6435b67ad23c 32 *
tvendov 0:6435b67ad23c 33 * #include "mbed.h"
tvendov 0:6435b67ad23c 34 *
tvendov 0:6435b67ad23c 35 * Ethernet eth;
tvendov 0:6435b67ad23c 36 *
tvendov 0:6435b67ad23c 37 * int main() {
tvendov 0:6435b67ad23c 38 * char buf[0x600];
tvendov 0:6435b67ad23c 39 *
tvendov 0:6435b67ad23c 40 * while(1) {
tvendov 0:6435b67ad23c 41 * int size = eth.receive();
tvendov 0:6435b67ad23c 42 * if(size > 0) {
tvendov 0:6435b67ad23c 43 * eth.read(buf, size);
tvendov 0:6435b67ad23c 44 * printf("Destination: %02X:%02X:%02X:%02X:%02X:%02X\n",
tvendov 0:6435b67ad23c 45 * buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]);
tvendov 0:6435b67ad23c 46 * printf("Source: %02X:%02X:%02X:%02X:%02X:%02X\n",
tvendov 0:6435b67ad23c 47 * buf[6], buf[7], buf[8], buf[9], buf[10], buf[11]);
tvendov 0:6435b67ad23c 48 * }
tvendov 0:6435b67ad23c 49 *
tvendov 0:6435b67ad23c 50 * wait(1);
tvendov 0:6435b67ad23c 51 * }
tvendov 0:6435b67ad23c 52 * }
tvendov 0:6435b67ad23c 53 * @endcode
tvendov 0:6435b67ad23c 54 */
tvendov 0:6435b67ad23c 55 class Ethernet {
tvendov 0:6435b67ad23c 56
tvendov 0:6435b67ad23c 57 public:
tvendov 0:6435b67ad23c 58
tvendov 0:6435b67ad23c 59 /** Initialise the ethernet interface.
tvendov 0:6435b67ad23c 60 */
tvendov 0:6435b67ad23c 61 Ethernet();
tvendov 0:6435b67ad23c 62
tvendov 0:6435b67ad23c 63 /** Powers the hardware down.
tvendov 0:6435b67ad23c 64 */
tvendov 0:6435b67ad23c 65 virtual ~Ethernet();
tvendov 0:6435b67ad23c 66
tvendov 0:6435b67ad23c 67 enum Mode {
tvendov 0:6435b67ad23c 68 AutoNegotiate,
tvendov 0:6435b67ad23c 69 HalfDuplex10,
tvendov 0:6435b67ad23c 70 FullDuplex10,
tvendov 0:6435b67ad23c 71 HalfDuplex100,
tvendov 0:6435b67ad23c 72 FullDuplex100
tvendov 0:6435b67ad23c 73 };
tvendov 0:6435b67ad23c 74
tvendov 0:6435b67ad23c 75 /** Writes into an outgoing ethernet packet.
tvendov 0:6435b67ad23c 76 *
tvendov 0:6435b67ad23c 77 * It will append size bytes of data to the previously written bytes.
tvendov 0:6435b67ad23c 78 *
tvendov 0:6435b67ad23c 79 * @param data An array to write.
tvendov 0:6435b67ad23c 80 * @param size The size of data.
tvendov 0:6435b67ad23c 81 *
tvendov 0:6435b67ad23c 82 * @returns
tvendov 0:6435b67ad23c 83 * The number of written bytes.
tvendov 0:6435b67ad23c 84 */
tvendov 0:6435b67ad23c 85 int write(const char *data, int size);
tvendov 0:6435b67ad23c 86
tvendov 0:6435b67ad23c 87 /** Send an outgoing ethernet packet.
tvendov 0:6435b67ad23c 88 *
tvendov 0:6435b67ad23c 89 * After filling in the data in an ethernet packet it must be send.
tvendov 0:6435b67ad23c 90 * Send will provide a new packet to write to.
tvendov 0:6435b67ad23c 91 *
tvendov 0:6435b67ad23c 92 * @returns
tvendov 0:6435b67ad23c 93 * 0 if the sending was failed,
tvendov 0:6435b67ad23c 94 * or the size of the packet successfully sent.
tvendov 0:6435b67ad23c 95 */
tvendov 0:6435b67ad23c 96 int send();
tvendov 0:6435b67ad23c 97
tvendov 0:6435b67ad23c 98 /** Recevies an arrived ethernet packet.
tvendov 0:6435b67ad23c 99 *
tvendov 0:6435b67ad23c 100 * Receiving an ethernet packet will drop the last received ethernet packet
tvendov 0:6435b67ad23c 101 * and make a new ethernet packet ready to read.
tvendov 0:6435b67ad23c 102 * If no ethernet packet is arrived it will return 0.
tvendov 0:6435b67ad23c 103 *
tvendov 0:6435b67ad23c 104 * @returns
tvendov 0:6435b67ad23c 105 * 0 if no ethernet packet is arrived,
tvendov 0:6435b67ad23c 106 * or the size of the arrived packet.
tvendov 0:6435b67ad23c 107 */
tvendov 0:6435b67ad23c 108 int receive();
tvendov 0:6435b67ad23c 109
tvendov 0:6435b67ad23c 110 /** Read from an recevied ethernet packet.
tvendov 0:6435b67ad23c 111 *
tvendov 0:6435b67ad23c 112 * After receive returnd a number bigger than 0it is
tvendov 0:6435b67ad23c 113 * possible to read bytes from this packet.
tvendov 0:6435b67ad23c 114 * Read will write up to size bytes into data.
tvendov 0:6435b67ad23c 115 *
tvendov 0:6435b67ad23c 116 * It is possible to use read multible times.
tvendov 0:6435b67ad23c 117 * Each time read will start reading after the last read byte before.
tvendov 0:6435b67ad23c 118 *
tvendov 0:6435b67ad23c 119 * @returns
tvendov 0:6435b67ad23c 120 * The number of byte read.
tvendov 0:6435b67ad23c 121 */
tvendov 0:6435b67ad23c 122 int read(char *data, int size);
tvendov 0:6435b67ad23c 123
tvendov 0:6435b67ad23c 124 /** Gives the ethernet address of the mbed.
tvendov 0:6435b67ad23c 125 *
tvendov 0:6435b67ad23c 126 * @param mac Must be a pointer to a 6 byte char array to copy the ethernet address in.
tvendov 0:6435b67ad23c 127 */
tvendov 0:6435b67ad23c 128 void address(char *mac);
tvendov 0:6435b67ad23c 129
tvendov 0:6435b67ad23c 130 /** Returns if an ethernet link is pressent or not. It takes a wile after Ethernet initializion to show up.
tvendov 0:6435b67ad23c 131 *
tvendov 0:6435b67ad23c 132 * @returns
tvendov 0:6435b67ad23c 133 * 0 if no ethernet link is pressent,
tvendov 0:6435b67ad23c 134 * 1 if an ethernet link is pressent.
tvendov 0:6435b67ad23c 135 *
tvendov 0:6435b67ad23c 136 * Example:
tvendov 0:6435b67ad23c 137 * @code
tvendov 0:6435b67ad23c 138 * // Using the Ethernet link function
tvendov 0:6435b67ad23c 139 * #include "mbed.h"
tvendov 0:6435b67ad23c 140 *
tvendov 0:6435b67ad23c 141 * Ethernet eth;
tvendov 0:6435b67ad23c 142 *
tvendov 0:6435b67ad23c 143 * int main() {
tvendov 0:6435b67ad23c 144 * wait(1); // Needed after startup.
tvendov 0:6435b67ad23c 145 * if (eth.link()) {
tvendov 0:6435b67ad23c 146 * printf("online\n");
tvendov 0:6435b67ad23c 147 * } else {
tvendov 0:6435b67ad23c 148 * printf("offline\n");
tvendov 0:6435b67ad23c 149 * }
tvendov 0:6435b67ad23c 150 * }
tvendov 0:6435b67ad23c 151 * @endcode
tvendov 0:6435b67ad23c 152 */
tvendov 0:6435b67ad23c 153 int link();
tvendov 0:6435b67ad23c 154
tvendov 0:6435b67ad23c 155 /** Sets the speed and duplex parameters of an ethernet link
tvendov 0:6435b67ad23c 156 *
tvendov 0:6435b67ad23c 157 * - AutoNegotiate Auto negotiate speed and duplex
tvendov 0:6435b67ad23c 158 * - HalfDuplex10 10 Mbit, half duplex
tvendov 0:6435b67ad23c 159 * - FullDuplex10 10 Mbit, full duplex
tvendov 0:6435b67ad23c 160 * - HalfDuplex100 100 Mbit, half duplex
tvendov 0:6435b67ad23c 161 * - FullDuplex100 100 Mbit, full duplex
tvendov 0:6435b67ad23c 162 *
tvendov 0:6435b67ad23c 163 * @param mode the speed and duplex mode to set the link to:
tvendov 0:6435b67ad23c 164 */
tvendov 0:6435b67ad23c 165 void set_link(Mode mode);
tvendov 0:6435b67ad23c 166 };
tvendov 0:6435b67ad23c 167
tvendov 0:6435b67ad23c 168 } // namespace mbed
tvendov 0:6435b67ad23c 169
tvendov 0:6435b67ad23c 170 #endif
tvendov 0:6435b67ad23c 171
tvendov 0:6435b67ad23c 172 #endif
tvendov 0:6435b67ad23c 173