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
hal/common/Timer.cpp@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 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 "Timer.h" |
tvendov | 0:6435b67ad23c | 17 | #include "ticker_api.h" |
tvendov | 0:6435b67ad23c | 18 | #include "us_ticker_api.h" |
tvendov | 0:6435b67ad23c | 19 | #include "critical.h" |
tvendov | 0:6435b67ad23c | 20 | |
tvendov | 0:6435b67ad23c | 21 | namespace mbed { |
tvendov | 0:6435b67ad23c | 22 | |
tvendov | 0:6435b67ad23c | 23 | Timer::Timer() : _running(), _start(), _time(), _ticker_data(get_us_ticker_data()) { |
tvendov | 0:6435b67ad23c | 24 | reset(); |
tvendov | 0:6435b67ad23c | 25 | } |
tvendov | 0:6435b67ad23c | 26 | |
tvendov | 0:6435b67ad23c | 27 | Timer::Timer(const ticker_data_t *data) : _running(), _start(), _time(), _ticker_data(data) { |
tvendov | 0:6435b67ad23c | 28 | reset(); |
tvendov | 0:6435b67ad23c | 29 | } |
tvendov | 0:6435b67ad23c | 30 | |
tvendov | 0:6435b67ad23c | 31 | void Timer::start() { |
tvendov | 0:6435b67ad23c | 32 | core_util_critical_section_enter(); |
tvendov | 0:6435b67ad23c | 33 | if (!_running) { |
tvendov | 0:6435b67ad23c | 34 | _start = ticker_read(_ticker_data); |
tvendov | 0:6435b67ad23c | 35 | _running = 1; |
tvendov | 0:6435b67ad23c | 36 | } |
tvendov | 0:6435b67ad23c | 37 | core_util_critical_section_exit(); |
tvendov | 0:6435b67ad23c | 38 | } |
tvendov | 0:6435b67ad23c | 39 | |
tvendov | 0:6435b67ad23c | 40 | void Timer::stop() { |
tvendov | 0:6435b67ad23c | 41 | core_util_critical_section_enter(); |
tvendov | 0:6435b67ad23c | 42 | _time += slicetime(); |
tvendov | 0:6435b67ad23c | 43 | _running = 0; |
tvendov | 0:6435b67ad23c | 44 | core_util_critical_section_exit(); |
tvendov | 0:6435b67ad23c | 45 | } |
tvendov | 0:6435b67ad23c | 46 | |
tvendov | 0:6435b67ad23c | 47 | int Timer::read_us() { |
tvendov | 0:6435b67ad23c | 48 | core_util_critical_section_enter(); |
tvendov | 0:6435b67ad23c | 49 | int time = _time + slicetime(); |
tvendov | 0:6435b67ad23c | 50 | core_util_critical_section_exit(); |
tvendov | 0:6435b67ad23c | 51 | return time; |
tvendov | 0:6435b67ad23c | 52 | } |
tvendov | 0:6435b67ad23c | 53 | |
tvendov | 0:6435b67ad23c | 54 | float Timer::read() { |
tvendov | 0:6435b67ad23c | 55 | return (float)read_us() / 1000000.0f; |
tvendov | 0:6435b67ad23c | 56 | } |
tvendov | 0:6435b67ad23c | 57 | |
tvendov | 0:6435b67ad23c | 58 | int Timer::read_ms() { |
tvendov | 0:6435b67ad23c | 59 | return read_us() / 1000; |
tvendov | 0:6435b67ad23c | 60 | } |
tvendov | 0:6435b67ad23c | 61 | |
tvendov | 0:6435b67ad23c | 62 | int Timer::slicetime() { |
tvendov | 0:6435b67ad23c | 63 | core_util_critical_section_enter(); |
tvendov | 0:6435b67ad23c | 64 | int ret = 0; |
tvendov | 0:6435b67ad23c | 65 | if (_running) { |
tvendov | 0:6435b67ad23c | 66 | ret = ticker_read(_ticker_data) - _start; |
tvendov | 0:6435b67ad23c | 67 | } |
tvendov | 0:6435b67ad23c | 68 | core_util_critical_section_exit(); |
tvendov | 0:6435b67ad23c | 69 | return ret; |
tvendov | 0:6435b67ad23c | 70 | } |
tvendov | 0:6435b67ad23c | 71 | |
tvendov | 0:6435b67ad23c | 72 | void Timer::reset() { |
tvendov | 0:6435b67ad23c | 73 | core_util_critical_section_enter(); |
tvendov | 0:6435b67ad23c | 74 | _start = ticker_read(_ticker_data); |
tvendov | 0:6435b67ad23c | 75 | _time = 0; |
tvendov | 0:6435b67ad23c | 76 | core_util_critical_section_exit(); |
tvendov | 0:6435b67ad23c | 77 | } |
tvendov | 0:6435b67ad23c | 78 | |
tvendov | 0:6435b67ad23c | 79 | Timer::operator float() { |
tvendov | 0:6435b67ad23c | 80 | return read(); |
tvendov | 0:6435b67ad23c | 81 | } |
tvendov | 0:6435b67ad23c | 82 | |
tvendov | 0:6435b67ad23c | 83 | } // namespace mbed |
tvendov | 0:6435b67ad23c | 84 |