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
RGA/rga_func.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 | /* |
tvendov | 0:6435b67ad23c | 2 | Permission is hereby granted, free of charge, to any person obtaining a copy |
tvendov | 0:6435b67ad23c | 3 | of this software and associated documentation files (the "Software"), to deal |
tvendov | 0:6435b67ad23c | 4 | in the Software without restriction, including without limitation the rights |
tvendov | 0:6435b67ad23c | 5 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
tvendov | 0:6435b67ad23c | 6 | copies of the Software, and to permit persons to whom the Software is |
tvendov | 0:6435b67ad23c | 7 | furnished to do so, subject to the following conditions: |
tvendov | 0:6435b67ad23c | 8 | |
tvendov | 0:6435b67ad23c | 9 | The above copyright notice and this permission notice shall be included in |
tvendov | 0:6435b67ad23c | 10 | all copies or substantial portions of the Software. |
tvendov | 0:6435b67ad23c | 11 | |
tvendov | 0:6435b67ad23c | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
tvendov | 0:6435b67ad23c | 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
tvendov | 0:6435b67ad23c | 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
tvendov | 0:6435b67ad23c | 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
tvendov | 0:6435b67ad23c | 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
tvendov | 0:6435b67ad23c | 17 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
tvendov | 0:6435b67ad23c | 18 | THE SOFTWARE. |
tvendov | 0:6435b67ad23c | 19 | */ |
tvendov | 0:6435b67ad23c | 20 | |
tvendov | 0:6435b67ad23c | 21 | #ifndef RGA_FUNC_H |
tvendov | 0:6435b67ad23c | 22 | #define RGA_FUNC_H |
tvendov | 0:6435b67ad23c | 23 | |
tvendov | 0:6435b67ad23c | 24 | #include "RGA.h" |
tvendov | 0:6435b67ad23c | 25 | #include "lcd_panel.h" |
tvendov | 0:6435b67ad23c | 26 | |
tvendov | 0:6435b67ad23c | 27 | typedef struct { |
tvendov | 0:6435b67ad23c | 28 | char * style; |
tvendov | 0:6435b67ad23c | 29 | int x; |
tvendov | 0:6435b67ad23c | 30 | int y; |
tvendov | 0:6435b67ad23c | 31 | int w; |
tvendov | 0:6435b67ad23c | 32 | int h; |
tvendov | 0:6435b67ad23c | 33 | } draw_rectangle_pos_t; |
tvendov | 0:6435b67ad23c | 34 | |
tvendov | 0:6435b67ad23c | 35 | typedef enum { |
tvendov | 0:6435b67ad23c | 36 | MANUAL_INTERACT, |
tvendov | 0:6435b67ad23c | 37 | AUTO_INTERACT |
tvendov | 0:6435b67ad23c | 38 | }interact_t; |
tvendov | 0:6435b67ad23c | 39 | |
tvendov | 0:6435b67ad23c | 40 | #if (LCD_VDC5_CH0_PANEL == LCD_CH0_PANEL_VKLCD70RT) |
tvendov | 0:6435b67ad23c | 41 | #define IMG_DRAW_WIDTH (518) |
tvendov | 0:6435b67ad23c | 42 | #define IMG_DRAW_HEIGHT (322) |
tvendov | 0:6435b67ad23c | 43 | #define IMAGE_WIDTH_SCROLL_FUNC (835) // Image width of Scroll function |
tvendov | 0:6435b67ad23c | 44 | #define IMAGE_HEIGHT_SCROLL_FUNC (322) // Image height of Scroll function |
tvendov | 0:6435b67ad23c | 45 | #define IMAGE_WIDTH_ZOOM_FUNC (518) // Image width of Zoom function |
tvendov | 0:6435b67ad23c | 46 | #define IMAGE_HEIGHT_ZOOM_FUNC (322) // Image height of Zoom function |
tvendov | 0:6435b67ad23c | 47 | #define CRYSTAL_DIAMETER (119) |
tvendov | 0:6435b67ad23c | 48 | #define SLIDE_WIDTH (106) |
tvendov | 0:6435b67ad23c | 49 | #define NO_DEV_X (285) |
tvendov | 0:6435b67ad23c | 50 | #define NO_DEV_Y (75) |
tvendov | 0:6435b67ad23c | 51 | #else |
tvendov | 0:6435b67ad23c | 52 | #define IMG_DRAW_WIDTH (235) |
tvendov | 0:6435b67ad23c | 53 | #define IMG_DRAW_HEIGHT (146) |
tvendov | 0:6435b67ad23c | 54 | #define IMAGE_WIDTH_SCROLL_FUNC (379) // Image width of Scroll function |
tvendov | 0:6435b67ad23c | 55 | #define IMAGE_HEIGHT_SCROLL_FUNC (146) // Image height of Scroll function |
tvendov | 0:6435b67ad23c | 56 | #define IMAGE_WIDTH_ZOOM_FUNC (235) // Image width of Zoom function |
tvendov | 0:6435b67ad23c | 57 | #define IMAGE_HEIGHT_ZOOM_FUNC (146) // Image height of Zoom function |
tvendov | 0:6435b67ad23c | 58 | #define CRYSTAL_DIAMETER (55) |
tvendov | 0:6435b67ad23c | 59 | #define SLIDE_WIDTH (50) |
tvendov | 0:6435b67ad23c | 60 | #define NO_DEV_X (128) |
tvendov | 0:6435b67ad23c | 61 | #define NO_DEV_Y (24) |
tvendov | 0:6435b67ad23c | 62 | #endif |
tvendov | 0:6435b67ad23c | 63 | |
tvendov | 0:6435b67ad23c | 64 | #define DISSOLVE_MAX_NUM (256) |
tvendov | 0:6435b67ad23c | 65 | #define SCROLL_MAX_NUM (IMAGE_WIDTH_SCROLL_FUNC - IMG_DRAW_WIDTH) |
tvendov | 0:6435b67ad23c | 66 | #define ZOOM_MAX_NUM (IMAGE_HEIGHT_ZOOM_FUNC / 2) |
tvendov | 0:6435b67ad23c | 67 | #define ROTATION_MAX_NUM (360) |
tvendov | 0:6435b67ad23c | 68 | #define ACCELERATE_MAX_NUM (256) |
tvendov | 0:6435b67ad23c | 69 | |
tvendov | 0:6435b67ad23c | 70 | #define ANIMATION_TIMING_EASE (0) |
tvendov | 0:6435b67ad23c | 71 | #define ANIMATION_TIMING_LINEAR (1) |
tvendov | 0:6435b67ad23c | 72 | #define ANIMATION_TIMING_EASE_IN (2) |
tvendov | 0:6435b67ad23c | 73 | #define ANIMATION_TIMING_EASE_OUT (3) |
tvendov | 0:6435b67ad23c | 74 | #define ANIMATION_TIMING_EASE_IN_OUT (4) |
tvendov | 0:6435b67ad23c | 75 | |
tvendov | 0:6435b67ad23c | 76 | extern void Set_RGAObject(frame_buffer_t* frmbuf_info); |
tvendov | 0:6435b67ad23c | 77 | extern void RGA_Func_DrawFullScreen(frame_buffer_t* frmbuf_info, const graphics_image_t *image); |
tvendov | 0:6435b67ad23c | 78 | extern void RGA_Func_DrawRectangle(frame_buffer_t* frmbuf_info, draw_rectangle_pos_t * pos, int pos_num); |
tvendov | 0:6435b67ad23c | 79 | extern void RGA_Func_DrawImage(frame_buffer_t* frmbuf_info, int x, int y); |
tvendov | 0:6435b67ad23c | 80 | extern void RGA_Func_Dissolve(frame_buffer_t* frmbuf_info, float32_t global_alpha, interact_t mode); |
tvendov | 0:6435b67ad23c | 81 | extern void RGA_Func_Scroll(frame_buffer_t* frmbuf_info, int src_width_pos, interact_t mode); |
tvendov | 0:6435b67ad23c | 82 | extern void RGA_Func_Zoom(frame_buffer_t* frmbuf_info, int src_height_pos, interact_t mode); |
tvendov | 0:6435b67ad23c | 83 | extern void RGA_Func_Rotation(frame_buffer_t* frmbuf_info, graphics_matrix_float_t image_angle, interact_t mode); |
tvendov | 0:6435b67ad23c | 84 | extern void RGA_Func_Accelerate(frame_buffer_t* frmbuf_info, int animation_timing, float32_t relative_pos); |
tvendov | 0:6435b67ad23c | 85 | extern void Rotor(frame_buffer_t* frmbuf_info, graphics_matrix_float_t image_angle); |
tvendov | 0:6435b67ad23c | 86 | |
tvendov | 0:6435b67ad23c | 87 | extern void RGA_Func_DrawCamScreen(uint8_t* cam_buffer); |
tvendov | 0:6435b67ad23c | 88 | extern void RGA_Func_DrawPNG(frame_buffer_t* frmbuf_info, const graphics_image_t* png_img, int x, int y); |
tvendov | 0:6435b67ad23c | 89 | extern bool RGA_Func_CheckPorts(frame_buffer_t* frmbuf_info, bool rca_pluged, bool usb_pluged); |
tvendov | 0:6435b67ad23c | 90 | extern void RGA_Func_Rotor(frame_buffer_t* frmbuf_info, graphics_matrix_float_t image_angle, interact_t mode, graphics_image_t *image); |
tvendov | 0:6435b67ad23c | 91 | extern void RGA_Func_Axel(frame_buffer_t* frmbuf_info, int animation_timing, float32_t relative_pos, graphics_image_t* image); |
tvendov | 0:6435b67ad23c | 92 | extern void RGA_Func_Zo(frame_buffer_t* frmbuf_info, int src_height_pos, interact_t mode, graphics_image_t* image); |
tvendov | 0:6435b67ad23c | 93 | extern void RGA_Func_Scr(frame_buffer_t* frmbuf_info, int src_width_pos, interact_t mode, graphics_image_t* image); |
tvendov | 0:6435b67ad23c | 94 | extern void RGA_Func_Diss(frame_buffer_t* frmbuf_info, float32_t global_alpha, interact_t mode, graphics_image_t* image); |
tvendov | 0:6435b67ad23c | 95 | #endif |
tvendov | 0:6435b67ad23c | 96 |