Image scroll Sample. This program uses GraphicsFramework library and Si1143 sensor.

Dependencies:   GR-PEACH_video GraphicsFramework R_BSP SI1143 mbed-rtos mbed

Fork of RGA_HelloWorld by Renesas

About Si1143

Si1143 is a gesture sensor and can be controlled by using the I2C.
This can be detected from the shortest 1cm up to 200cm.
Si1143 emits three infrared LED that is mounted on a substrate, and detects the movement by measuring the reflected light from the external object.

About wiring

VDD3.3V
SCLD15
SDAD14
GNDGND

rga_func.h

Committer:
1050186
Date:
2016-05-30
Revision:
4:2318f8bee89c
Parent:
3:841987280a7f

File content as of revision 4:2318f8bee89c:

/*
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
 
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
 
#ifndef RGA_FUNC_H
#define RGA_FUNC_H

#include "RGA.h"

#define IMG_DRAW_WIDTH                      (241)
#define IMG_DRAW_HEIGHT                     (180)
#define IMAGE_WIDTH_SCROLL_FUNC             (352)      // Image width of Scroll function
#define IMAGE_HEIGHT_SCROLL_FUNC            (233)      // Image height of Scroll function

#define SCROLL_STEP_NUM                     (30)       // minimum 1

enum {
    DIREC_NON,
    DIREC_UP,
    DIREC_DOWN,
    DIREC_LEFT,
    DIREC_RIGHT
};


extern void Set_RGAObject(frame_buffer_t* frmbuf_info);
void RGA_Func_DrawTopScreen(frame_buffer_t* frmbuf_info, const graphics_image_t* image);
void RGA_Func_Scroll(frame_buffer_t* frmbuf_info, const graphics_image_t* image_old, const graphics_image_t* image_new, 
                     int direction, float32_t scroll);

#endif