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
VKLCD70RT
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.
- 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
USB/USBHostHub/USBHostHub.h@0:6435b67ad23c, 2017-02-16 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
tvendov | 0:6435b67ad23c | 1 | /* mbed USBHost 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 | |
tvendov | 0:6435b67ad23c | 17 | #ifndef USBHOSTHUB_H |
tvendov | 0:6435b67ad23c | 18 | #define USBHOSTHUB_H |
tvendov | 0:6435b67ad23c | 19 | |
tvendov | 0:6435b67ad23c | 20 | #include "USBHostConf.h" |
tvendov | 0:6435b67ad23c | 21 | |
tvendov | 0:6435b67ad23c | 22 | #if MAX_HUB_NB |
tvendov | 0:6435b67ad23c | 23 | |
tvendov | 0:6435b67ad23c | 24 | #include "USBHostTypes.h" |
tvendov | 0:6435b67ad23c | 25 | #include "IUSBEnumerator.h" |
tvendov | 0:6435b67ad23c | 26 | |
tvendov | 0:6435b67ad23c | 27 | class USBHost; |
tvendov | 0:6435b67ad23c | 28 | class USBDeviceConnected; |
tvendov | 0:6435b67ad23c | 29 | class USBEndpoint; |
tvendov | 0:6435b67ad23c | 30 | |
tvendov | 0:6435b67ad23c | 31 | /** |
tvendov | 0:6435b67ad23c | 32 | * A class to use a USB Hub |
tvendov | 0:6435b67ad23c | 33 | */ |
tvendov | 0:6435b67ad23c | 34 | class USBHostHub : public IUSBEnumerator { |
tvendov | 0:6435b67ad23c | 35 | public: |
tvendov | 0:6435b67ad23c | 36 | /** |
tvendov | 0:6435b67ad23c | 37 | * Constructor |
tvendov | 0:6435b67ad23c | 38 | */ |
tvendov | 0:6435b67ad23c | 39 | USBHostHub(); |
tvendov | 0:6435b67ad23c | 40 | |
tvendov | 0:6435b67ad23c | 41 | /** |
tvendov | 0:6435b67ad23c | 42 | * Check if a USB Hub is connected |
tvendov | 0:6435b67ad23c | 43 | * |
tvendov | 0:6435b67ad23c | 44 | * @return true if a serial device is connected |
tvendov | 0:6435b67ad23c | 45 | */ |
tvendov | 0:6435b67ad23c | 46 | bool connected(); |
tvendov | 0:6435b67ad23c | 47 | |
tvendov | 0:6435b67ad23c | 48 | /** |
tvendov | 0:6435b67ad23c | 49 | * Try to connect device |
tvendov | 0:6435b67ad23c | 50 | * |
tvendov | 0:6435b67ad23c | 51 | * @param dev device to connect |
tvendov | 0:6435b67ad23c | 52 | * @return true if connection was successful |
tvendov | 0:6435b67ad23c | 53 | */ |
tvendov | 0:6435b67ad23c | 54 | bool connect(USBDeviceConnected * dev); |
tvendov | 0:6435b67ad23c | 55 | |
tvendov | 0:6435b67ad23c | 56 | /** |
tvendov | 0:6435b67ad23c | 57 | * Automatically called by USBHost when a device |
tvendov | 0:6435b67ad23c | 58 | * has been enumerated by usb_thread |
tvendov | 0:6435b67ad23c | 59 | * |
tvendov | 0:6435b67ad23c | 60 | * @param dev device connected |
tvendov | 0:6435b67ad23c | 61 | */ |
tvendov | 0:6435b67ad23c | 62 | void deviceConnected(USBDeviceConnected * dev); |
tvendov | 0:6435b67ad23c | 63 | |
tvendov | 0:6435b67ad23c | 64 | /** |
tvendov | 0:6435b67ad23c | 65 | * Automatically called by USBHost when a device |
tvendov | 0:6435b67ad23c | 66 | * has been disconnected from this hub |
tvendov | 0:6435b67ad23c | 67 | * |
tvendov | 0:6435b67ad23c | 68 | * @param dev device disconnected |
tvendov | 0:6435b67ad23c | 69 | */ |
tvendov | 0:6435b67ad23c | 70 | void deviceDisconnected(USBDeviceConnected * dev); |
tvendov | 0:6435b67ad23c | 71 | |
tvendov | 0:6435b67ad23c | 72 | /** |
tvendov | 0:6435b67ad23c | 73 | * Rest a specific port |
tvendov | 0:6435b67ad23c | 74 | * |
tvendov | 0:6435b67ad23c | 75 | * @param port port number |
tvendov | 0:6435b67ad23c | 76 | */ |
tvendov | 0:6435b67ad23c | 77 | void portReset(uint8_t port); |
tvendov | 0:6435b67ad23c | 78 | |
tvendov | 0:6435b67ad23c | 79 | /* |
tvendov | 0:6435b67ad23c | 80 | * Called by USBHost to set the instance of USBHost |
tvendov | 0:6435b67ad23c | 81 | * |
tvendov | 0:6435b67ad23c | 82 | * @param host host instance |
tvendov | 0:6435b67ad23c | 83 | */ |
tvendov | 0:6435b67ad23c | 84 | void setHost(USBHost * host); |
tvendov | 0:6435b67ad23c | 85 | |
tvendov | 0:6435b67ad23c | 86 | /** |
tvendov | 0:6435b67ad23c | 87 | * Called by USBhost when a hub has been disconnected |
tvendov | 0:6435b67ad23c | 88 | */ |
tvendov | 0:6435b67ad23c | 89 | void hubDisconnected(); |
tvendov | 0:6435b67ad23c | 90 | |
tvendov | 0:6435b67ad23c | 91 | protected: |
tvendov | 0:6435b67ad23c | 92 | //From IUSBEnumerator |
tvendov | 0:6435b67ad23c | 93 | virtual void setVidPid(uint16_t vid, uint16_t pid); |
tvendov | 0:6435b67ad23c | 94 | virtual bool parseInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol); //Must return true if the interface should be parsed |
tvendov | 0:6435b67ad23c | 95 | virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir); //Must return true if the endpoint will be used |
tvendov | 0:6435b67ad23c | 96 | |
tvendov | 0:6435b67ad23c | 97 | private: |
tvendov | 0:6435b67ad23c | 98 | USBHost * host; |
tvendov | 0:6435b67ad23c | 99 | USBDeviceConnected * dev; |
tvendov | 0:6435b67ad23c | 100 | bool dev_connected; |
tvendov | 0:6435b67ad23c | 101 | USBEndpoint * int_in; |
tvendov | 0:6435b67ad23c | 102 | uint8_t nb_port; |
tvendov | 0:6435b67ad23c | 103 | uint8_t hub_characteristics; |
tvendov | 0:6435b67ad23c | 104 | |
tvendov | 0:6435b67ad23c | 105 | void rxHandler(); |
tvendov | 0:6435b67ad23c | 106 | |
tvendov | 0:6435b67ad23c | 107 | uint8_t buf[sizeof(HubDescriptor)]; |
tvendov | 0:6435b67ad23c | 108 | |
tvendov | 0:6435b67ad23c | 109 | int hub_intf; |
tvendov | 0:6435b67ad23c | 110 | bool hub_device_found; |
tvendov | 0:6435b67ad23c | 111 | |
tvendov | 0:6435b67ad23c | 112 | void setPortFeature(uint32_t feature, uint8_t port); |
tvendov | 0:6435b67ad23c | 113 | void clearPortFeature(uint32_t feature, uint8_t port); |
tvendov | 0:6435b67ad23c | 114 | uint32_t getPortStatus(uint8_t port); |
tvendov | 0:6435b67ad23c | 115 | |
tvendov | 0:6435b67ad23c | 116 | USBDeviceConnected * device_children[MAX_HUB_PORT]; |
tvendov | 0:6435b67ad23c | 117 | |
tvendov | 0:6435b67ad23c | 118 | void init(); |
tvendov | 0:6435b67ad23c | 119 | void disconnect(); |
tvendov | 0:6435b67ad23c | 120 | |
tvendov | 0:6435b67ad23c | 121 | }; |
tvendov | 0:6435b67ad23c | 122 | |
tvendov | 0:6435b67ad23c | 123 | #endif |
tvendov | 0:6435b67ad23c | 124 | |
tvendov | 0:6435b67ad23c | 125 | #endif |