Graphics framework for GR-PEACH. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Dependents:   ImageZoomInout_Sample ImageRotaion_Sample ImageScroll_Sample GR-PEACH_LCD_4_3inch_Save_to_USB ... more

License

When you use this library, we judge you have agreed to the following contents.

https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Note

If you import the GraphicsFramework library, please import GR-PEACH_video library and R_BSP library together.



JPEG Converter

The JPEG Converter driver implements encode and decode functionality which uses the JCU of the RZ/A Series.

Hello World!

Import programJCU_HelloWorld

Hello World for JCU(JPEG Codec Unit). JCU is JPEG codec unit of RZ/A1. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

API

Import library

Data Structures

struct bitmap_buff_info_t
Bitmap data setting struct. More...
struct encode_options_t
Encode option setting. More...

Public Types

enum jpeg_conv_error_t {
JPEG_CONV_OK = 0, JPEG_CONV_JCU_ERR = -1, JPEG_CONV_FORMA_ERR = -2, JPEG_CONV_PARAM_ERR = -3,
JPEG_CONV_BUSY = -4, JPEG_CONV_PARAM_RANGE_ERR = -7
}

Error codes.

More...
enum wr_rd_swa_t {
WR_RD_WRSWA_NON = 0, WR_RD_WRSWA_8BIT = 1, WR_RD_WRSWA_16BIT = 2, WR_RD_WRSWA_16_8BIT = 3,
WR_RD_WRSWA_32BIT = 4, WR_RD_WRSWA_32_8BIT = 5, WR_RD_WRSWA_32_16BIT = 6, WR_RD_WRSWA_32_16_8BIT = 7
}

Write/Read image pixcel frame buffer swap setting.

More...
enum wr_rd_format_t { WR_RD_YCbCr422 = 0x00, WR_RD_ARGB8888 = 0x01, WR_RD_RGB565 = 0x02 }

Write/Read image pixcel format selects.

More...
enum sub_sampling_t { SUB_SAMPLING_1_1 = 0x00, SUB_SAMPLING_1_2 = 0x01, SUB_SAMPLING_1_4 = 0x02, SUB_SAMPLING_1_8 = 0x03 }

Thinning output image selects.

More...
enum cbcr_offset_t { CBCR_OFFSET_0 = 0x00, CBCR_OFFSET_128 = 0x01 }

Cb/Cr range selects for decode.

More...

Public Member Functions

JPEG_Converter ()
Constructor method of JPEG converter(encode/decode)
virtual ~JPEG_Converter ()
Destructor method of JPEG converter(encode/decode)
JPEG_Converter::jpeg_conv_error_t decode (void *pJpegBuff, bitmap_buff_info_t *psOutputBuff)
Decode JPEG to rinear data.
JPEG_Converter::jpeg_conv_error_t decode (void *pJpegBuff, bitmap_buff_info_t *psOutputBuff, decode_options_t *pOptions)
JPEG data decode to bitmap.
JPEG_Converter::jpeg_conv_error_t encode ( bitmap_buff_info_t *psInputBuff, void *pJpegBuff, size_t *pEncodeSize)
Encode rinear data to JPEG.
JPEG_Converter::jpeg_conv_error_t encode ( bitmap_buff_info_t *psInputBuff, void *pJpegBuff, size_t *pEncodeSize, encode_options_t *pOptions)
Bitmap data encode to JPEG.
JPEG_Converter::jpeg_conv_error_t SetQuality (const uint8_t qual)
Set encode quality.

Correspondence file

A correspondence file of JPEG Converter is as the following table.

JPEGCorrespondence
Width>0(greater than 0)
Height>0(greater than 0)
Color formatYCbCr444, YCbCr422, YCbCr420, YCbCr411
BitmapCorrespondence
Width>0(greater than 0)
Height>0(greater than 0)
Color formatYCbCr422

Notice

You run JPEG converter once destruction each time.

You set whether these JPEG files aren't input, or it check error setting decode(set in "flag" = true). The JPEG file which becomes correspondence outside will be the following condition.

  • File besides the above-mentioned correspondence file.
  • As information in the JPEG file, WIDTH or HEIGHT is larger than output buffer setting.

Buffer area is used encode/decode, set 8 bytes align and non-cash memory area. The output buffer when decoding, is made beyond the size decided in the size of the JPEG file, the format, setting of thinning out. You make output buffer for decode/encode to enough big size in order to stock this result. JPEG Converter, if you do not particularly perform specified, does not check size against the output data at the time of encoding and decoding. You set the output buffer so that there is no effect of corruption by the output data.

Color format

Color format in case to be converted from Bitmap to JPEG is either ARGB8888 or RGB555, YCbCr422. Color format of the If you want to convert from JPEG file to Bitmap file is YCbCr422. You correct "alpha(member of decode_options_t)" of setting and "output_cb_cr_offset(member of decode_options_t)" according to color format when decoding.

  • example
    decode to ARGB8888(WR_RD_ARGB8888 set in format member of bitmap_buff_info_t)
    alpha = 0x01-0xFF
    output_cb_cr_offset = CBCR_OFFSET_0

    decode to YCbCr422(WR_RD_YCbCr422 set in format member of bitmap_buff_info_t)
    alpha = 0
    output_cb_cr_offset = CBCR_OFFSET_0 or CBCR_OFFSET_128

    decode to RGB565(WR_RD_RGB565 set in format member of bitmap_buff_info_t)
    alpha = 0
    output_cb_cr_offset = CBCR_OFFSET_0

Decode/encode settings are optional

If omitted encode/decode settings, it will work with the following settings.
[Decode option setting (member of decode_options_t)]

  • Vertical sub sampling is thinning output image to 1/1.
  • Horizontal sub sampling is thinning output image to 1/1.
  • Output data of Cb/Cr range is -128 to 127.
  • Output data of swap in 8-bit units: 2-1-4-3-6-5-8-7.
  • Alpha value of 0.
  • JPEG format correspondence outside error check.
  • It decode in a synchronous function.

[Encode option setting (member of encode_options_t)]

  • DRI value is 0.
  • Encoding JPEG file start width offset is 0.
  • Encoding JPEG file start height offset is 0.
  • Input data of Cb/Cr range of input data is -128 to 127.
  • Input data swap in 8-bit units: 2-1-4-3-6-5-8-7.
  • It don't check encode size.
  • Quantization Y use default table(Quality75).
  • Quantization C use default table(Quality75).
  • Huffman Y DC use default table.
  • Huffman C DC use default table.
  • Huffman Y AC use default table.
  • Huffman C AC use default table.
  • It encode in a synchronous function.

Synchronous/asynchronous switching

Decoding and encoding setting to operate asynchronously by setting a callback function(decode_options_t and encode_options_t).

Quality

Quality changes are possible. If you want to change the Quality, please specify the table made of Quality you want to change the address of the setting. If you do not want to change the Quality, it will operate at Quality75.

RGA

The RGA library implements fast drawing functionality which uses the RGA of the RZ/A Series.
Supporting compiler is ARMCC, GCC ARM and IAR.

Hello World!

Import programRGA_HelloWorld

Hello World for RGA(Renesas Graphics Architecture). RGA is the Graphics Library of RZ/A1. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Committer:
dkato
Date:
Mon Apr 24 08:16:23 2017 +0000
Revision:
13:1ee2176ef13f
Parent:
3:9f857750e4e9
Add "SetQuality()" to JCU.
; Bug fixes.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
1050186 3:9f857750e4e9 1 /******************************************************************************
1050186 3:9f857750e4e9 2 * Copyright(c) 2010-2015 Renesas Electronics Corporation. All rights reserved.
1050186 3:9f857750e4e9 3 *
1050186 3:9f857750e4e9 4 * brief : R-GPVG control functions
1050186 3:9f857750e4e9 5 *
1050186 3:9f857750e4e9 6 * author : Renesas Electronics Corporation
1050186 3:9f857750e4e9 7 *
1050186 3:9f857750e4e9 8 * history: 2010.10.08
1050186 3:9f857750e4e9 9 * - Created the initial code.
1050186 3:9f857750e4e9 10 * 2011.03.07
1050186 3:9f857750e4e9 11 * - Fixed bug : NCGVG_Detach_ISR / [R-GPVG_common_P_033]
1050186 3:9f857750e4e9 12 * 2012.08.22
1050186 3:9f857750e4e9 13 * - Moved definition to "ncg_vg_isr.h".
1050186 3:9f857750e4e9 14 * - RGPVG_INT_LEVEL
1050186 3:9f857750e4e9 15 * - Moved definition to "ncg_register.h".
1050186 3:9f857750e4e9 16 * - RTIP_VG_BASE
1050186 3:9f857750e4e9 17 * - VG_REG_VG_ISR
1050186 3:9f857750e4e9 18 * 2012.08.22
1050186 3:9f857750e4e9 19 * - Added error message in the debug mode.
1050186 3:9f857750e4e9 20 * - Update all comments
1050186 3:9f857750e4e9 21 * 2013.02.21
1050186 3:9f857750e4e9 22 * - Modified the argument of the NCGVG_RGPVG_ISR.
1050186 3:9f857750e4e9 23 * - Modified the call to R_INTC_RegistIntFunc function
1050186 3:9f857750e4e9 24 * by NCGVG_Attach_ISR.
1050186 3:9f857750e4e9 25 * 2014.12.22
1050186 3:9f857750e4e9 26 * - Applied to OSPL and RGA.
1050186 3:9f857750e4e9 27 *
1050186 3:9f857750e4e9 28 *******************************************************************************/
1050186 3:9f857750e4e9 29
1050186 3:9f857750e4e9 30
1050186 3:9f857750e4e9 31 /*=============================================================================
1050186 3:9f857750e4e9 32 * Includes
1050186 3:9f857750e4e9 33 */
1050186 3:9f857750e4e9 34
1050186 3:9f857750e4e9 35 #include "Project_Config.h"
1050186 3:9f857750e4e9 36 #include "ncg_defs.h"
1050186 3:9f857750e4e9 37 #include "ncg_debug.h"
1050186 3:9f857750e4e9 38 #include "ncg_vg_isr.h"
1050186 3:9f857750e4e9 39 #include "RGA.h"
1050186 3:9f857750e4e9 40
1050186 3:9f857750e4e9 41 /* Depending on the build environment */
1050186 3:9f857750e4e9 42 #include "r_typedefs.h"
1050186 3:9f857750e4e9 43 #include "r_ospl.h"
1050186 3:9f857750e4e9 44
1050186 3:9f857750e4e9 45 #ifdef RGAH_VERSION
1050186 3:9f857750e4e9 46
1050186 3:9f857750e4e9 47 /*=============================================================================
1050186 3:9f857750e4e9 48 * Internal definitions
1050186 3:9f857750e4e9 49 */
1050186 3:9f857750e4e9 50
1050186 3:9f857750e4e9 51
1050186 3:9f857750e4e9 52 /*=============================================================================
1050186 3:9f857750e4e9 53 * Prototyping of internal functions
1050186 3:9f857750e4e9 54 */
1050186 3:9f857750e4e9 55 static void NCGVG_RGPVG_ISR(void) ;
1050186 3:9f857750e4e9 56 static void NCGVG_RGPVG_ISR_0(void) ;
1050186 3:9f857750e4e9 57 static void NCGVG_RGPVG_ISR_1(void) ;
1050186 3:9f857750e4e9 58 static void NCGVG_RGPVG_ISR_2(void) ;
1050186 3:9f857750e4e9 59 static void NCGVG_RGPVG_ISR_3(void) ;
1050186 3:9f857750e4e9 60
1050186 3:9f857750e4e9 61
1050186 3:9f857750e4e9 62 /*=============================================================================
1050186 3:9f857750e4e9 63 * Private global variables and functions
1050186 3:9f857750e4e9 64 */
1050186 3:9f857750e4e9 65 static NCGboolean NCGVG_ISR_Initialized = NCG_FALSE ;
1050186 3:9f857750e4e9 66 static NCGVGISRfp NCGVG_pRGPVG_Interrupt = NCG_NULL ;
1050186 3:9f857750e4e9 67
1050186 3:9f857750e4e9 68
1050186 3:9f857750e4e9 69 /*=============================================================================
1050186 3:9f857750e4e9 70 * Global Function
1050186 3:9f857750e4e9 71 */
1050186 3:9f857750e4e9 72
1050186 3:9f857750e4e9 73 /*----------------------------------------------------------------------------
1050186 3:9f857750e4e9 74 NAME : NCGVG_Attach_ISR
1050186 3:9f857750e4e9 75 FUNCTION : Attach the function pointer of OpenVG ISR.
1050186 3:9f857750e4e9 76 PARAMETERS : pfnInterrupt : [IN ] The pointer to the function of OpenVG ISR.
1050186 3:9f857750e4e9 77 RETURN : Error code of the NCG.
1050186 3:9f857750e4e9 78 ------------------------------------------------------------------------------*/
1050186 3:9f857750e4e9 79 NCGint32
1050186 3:9f857750e4e9 80 NCGVG_Attach_ISR(
1050186 3:9f857750e4e9 81 NCGVGISRfp pfnInterrupt )
1050186 3:9f857750e4e9 82 {
1050186 3:9f857750e4e9 83 NCGint32 rc_val = NCG_no_err;
1050186 3:9f857750e4e9 84 bsp_int_err_t eb;
1050186 3:9f857750e4e9 85 errnum_t e;
1050186 3:9f857750e4e9 86
1050186 3:9f857750e4e9 87 NCG_DEBUG_PRINT_STRING( "[LOG] NCGVG_Attach_ISR" );
1050186 3:9f857750e4e9 88
1050186 3:9f857750e4e9 89 NCG_ASSERT(pfnInterrupt != NCG_NULL);
1050186 3:9f857750e4e9 90
1050186 3:9f857750e4e9 91 if( NCGVG_ISR_Initialized != NCG_FALSE ) {
1050186 3:9f857750e4e9 92 NCG_DEBUG_MAKE_MSG_START( NCG_G_MASSAGE_BUFF, "[NCG][ERROR]NCGVG_Attach_ISR(1) Initialized.%s" )
1050186 3:9f857750e4e9 93 NCG_DEBUG_MAKE_MSG_PARAMETER( NCG_CRLF )
1050186 3:9f857750e4e9 94 NCG_DEBUG_MAKE_MSG_END();
1050186 3:9f857750e4e9 95 NCG_DEBUG_PRINT_MSG( NCG_G_MASSAGE_BUFF );
1050186 3:9f857750e4e9 96 rc_val = NCG_err_isr_management_failed ;
1050186 3:9f857750e4e9 97 } else {
1050186 3:9f857750e4e9 98 NCGVG_ISR_Initialized = NCG_TRUE ;
1050186 3:9f857750e4e9 99 NCGVG_pRGPVG_Interrupt = pfnInterrupt ;
1050186 3:9f857750e4e9 100
1050186 3:9f857750e4e9 101 /* Regist function */
1050186 3:9f857750e4e9 102 eb= R_BSP_InterruptWrite( BSP_INT_SRC_INT0, NCGVG_RGPVG_ISR_0 );
1050186 3:9f857750e4e9 103 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 104 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 105 goto fin;
1050186 3:9f857750e4e9 106 }
1050186 3:9f857750e4e9 107 eb= R_BSP_InterruptWrite( BSP_INT_SRC_INT1, NCGVG_RGPVG_ISR_1 );
1050186 3:9f857750e4e9 108 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 109 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 110 goto fin;
1050186 3:9f857750e4e9 111 }
1050186 3:9f857750e4e9 112 eb= R_BSP_InterruptWrite( BSP_INT_SRC_INT2, NCGVG_RGPVG_ISR_2 );
1050186 3:9f857750e4e9 113 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 114 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 115 goto fin;
1050186 3:9f857750e4e9 116 }
1050186 3:9f857750e4e9 117 eb= R_BSP_InterruptWrite( BSP_INT_SRC_INT3, NCGVG_RGPVG_ISR_3 );
1050186 3:9f857750e4e9 118 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 119 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 120 goto fin;
1050186 3:9f857750e4e9 121 }
1050186 3:9f857750e4e9 122
1050186 3:9f857750e4e9 123 /* set priority */
1050186 3:9f857750e4e9 124 e= R_OSPL_SetInterruptPriority( BSP_INT_SRC_INT0, NCGVG_INT_LEVEL );
1050186 3:9f857750e4e9 125 IF(e) {
1050186 3:9f857750e4e9 126 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 127 goto fin;
1050186 3:9f857750e4e9 128 }
1050186 3:9f857750e4e9 129 e= R_OSPL_SetInterruptPriority( BSP_INT_SRC_INT1, NCGVG_INT_LEVEL );
1050186 3:9f857750e4e9 130 IF(e) {
1050186 3:9f857750e4e9 131 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 132 goto fin;
1050186 3:9f857750e4e9 133 }
1050186 3:9f857750e4e9 134 e= R_OSPL_SetInterruptPriority( BSP_INT_SRC_INT2, NCGVG_INT_LEVEL );
1050186 3:9f857750e4e9 135 IF(e) {
1050186 3:9f857750e4e9 136 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 137 goto fin;
1050186 3:9f857750e4e9 138 }
1050186 3:9f857750e4e9 139 e= R_OSPL_SetInterruptPriority( BSP_INT_SRC_INT3, NCGVG_INT_LEVEL );
1050186 3:9f857750e4e9 140 IF(e) {
1050186 3:9f857750e4e9 141 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 142 goto fin;
1050186 3:9f857750e4e9 143 }
1050186 3:9f857750e4e9 144
1050186 3:9f857750e4e9 145 /* Enable interrupt from Renesas OpenVG library */
1050186 3:9f857750e4e9 146 eb= R_BSP_InterruptControl( BSP_INT_SRC_INT0, BSP_INT_CMD_INTERRUPT_ENABLE, FIT_NO_PTR );
1050186 3:9f857750e4e9 147 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 148 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 149 goto fin;
1050186 3:9f857750e4e9 150 }
1050186 3:9f857750e4e9 151 eb= R_BSP_InterruptControl( BSP_INT_SRC_INT1, BSP_INT_CMD_INTERRUPT_ENABLE, FIT_NO_PTR );
1050186 3:9f857750e4e9 152 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 153 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 154 goto fin;
1050186 3:9f857750e4e9 155 }
1050186 3:9f857750e4e9 156 eb= R_BSP_InterruptControl( BSP_INT_SRC_INT2, BSP_INT_CMD_INTERRUPT_ENABLE, FIT_NO_PTR );
1050186 3:9f857750e4e9 157 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 158 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 159 goto fin;
1050186 3:9f857750e4e9 160 }
1050186 3:9f857750e4e9 161 eb= R_BSP_InterruptControl( BSP_INT_SRC_INT3, BSP_INT_CMD_INTERRUPT_ENABLE, FIT_NO_PTR );
1050186 3:9f857750e4e9 162 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 163 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 164 goto fin;
1050186 3:9f857750e4e9 165 }
1050186 3:9f857750e4e9 166 }
1050186 3:9f857750e4e9 167
1050186 3:9f857750e4e9 168 fin:
1050186 3:9f857750e4e9 169 return rc_val;
1050186 3:9f857750e4e9 170 }
1050186 3:9f857750e4e9 171
1050186 3:9f857750e4e9 172
1050186 3:9f857750e4e9 173 /*----------------------------------------------------------------------------
1050186 3:9f857750e4e9 174 NAME : NCGVG_Detach_ISR
1050186 3:9f857750e4e9 175 FUNCTION : Detach the function pointer of OpenVG ISR.
1050186 3:9f857750e4e9 176 PARAMETERS : pfnInterrupt : [IN ] The pointer to the function of OpenVG ISR.
1050186 3:9f857750e4e9 177 RETURN : Error code of the NCG.
1050186 3:9f857750e4e9 178 ------------------------------------------------------------------------------*/
1050186 3:9f857750e4e9 179 NCGint32
1050186 3:9f857750e4e9 180 NCGVG_Detach_ISR(
1050186 3:9f857750e4e9 181 NCGVGISRfp pfnInterrupt )
1050186 3:9f857750e4e9 182 {
1050186 3:9f857750e4e9 183 NCGint32 rc_val = NCG_no_err;
1050186 3:9f857750e4e9 184 bsp_int_err_t eb;
1050186 3:9f857750e4e9 185
1050186 3:9f857750e4e9 186 NCG_DEBUG_PRINT_STRING( "[LOG] NCGVG_Detach_ISR" );
1050186 3:9f857750e4e9 187
1050186 3:9f857750e4e9 188 NCG_ASSERT(pfnInterrupt != NCG_NULL);
1050186 3:9f857750e4e9 189
1050186 3:9f857750e4e9 190 if ( NCGVG_ISR_Initialized == NCG_FALSE ) {
1050186 3:9f857750e4e9 191 NCG_DEBUG_MAKE_MSG_START( NCG_G_MASSAGE_BUFF, "[NCG][ERROR]NCGVG_Detach_ISR(1) Not initialized.%s" )
1050186 3:9f857750e4e9 192 NCG_DEBUG_MAKE_MSG_PARAMETER( NCG_CRLF )
1050186 3:9f857750e4e9 193 NCG_DEBUG_MAKE_MSG_END();
1050186 3:9f857750e4e9 194 NCG_DEBUG_PRINT_MSG( NCG_G_MASSAGE_BUFF );
1050186 3:9f857750e4e9 195 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 196 } else {
1050186 3:9f857750e4e9 197 NCGVG_ISR_Initialized = NCG_FALSE ;
1050186 3:9f857750e4e9 198
1050186 3:9f857750e4e9 199 if( pfnInterrupt == NCGVG_pRGPVG_Interrupt ) {
1050186 3:9f857750e4e9 200 /* Disable interrupt from Renesas OpenVG library */
1050186 3:9f857750e4e9 201 eb= R_BSP_InterruptControl( BSP_INT_SRC_INT3, BSP_INT_CMD_INTERRUPT_DISABLE, FIT_NO_PTR );
1050186 3:9f857750e4e9 202 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 203 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 204 goto fin;
1050186 3:9f857750e4e9 205 }
1050186 3:9f857750e4e9 206 eb= R_BSP_InterruptControl( BSP_INT_SRC_INT2, BSP_INT_CMD_INTERRUPT_DISABLE, FIT_NO_PTR );
1050186 3:9f857750e4e9 207 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 208 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 209 goto fin;
1050186 3:9f857750e4e9 210 }
1050186 3:9f857750e4e9 211 eb= R_BSP_InterruptControl( BSP_INT_SRC_INT1, BSP_INT_CMD_INTERRUPT_DISABLE, FIT_NO_PTR );
1050186 3:9f857750e4e9 212 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 213 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 214 goto fin;
1050186 3:9f857750e4e9 215 }
1050186 3:9f857750e4e9 216 eb= R_BSP_InterruptControl( BSP_INT_SRC_INT0, BSP_INT_CMD_INTERRUPT_DISABLE, FIT_NO_PTR );
1050186 3:9f857750e4e9 217 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 218 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 219 goto fin;
1050186 3:9f857750e4e9 220 }
1050186 3:9f857750e4e9 221
1050186 3:9f857750e4e9 222 /* Unregist function */
1050186 3:9f857750e4e9 223 eb= R_BSP_InterruptWrite( BSP_INT_SRC_INT3, FIT_NO_FUNC );
1050186 3:9f857750e4e9 224 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 225 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 226 goto fin;
1050186 3:9f857750e4e9 227 }
1050186 3:9f857750e4e9 228 eb= R_BSP_InterruptWrite( BSP_INT_SRC_INT2, FIT_NO_FUNC );
1050186 3:9f857750e4e9 229 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 230 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 231 goto fin;
1050186 3:9f857750e4e9 232 }
1050186 3:9f857750e4e9 233 eb= R_BSP_InterruptWrite( BSP_INT_SRC_INT1, FIT_NO_FUNC );
1050186 3:9f857750e4e9 234 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 235 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 236 goto fin;
1050186 3:9f857750e4e9 237 }
1050186 3:9f857750e4e9 238 eb= R_BSP_InterruptWrite( BSP_INT_SRC_INT0, FIT_NO_FUNC );
1050186 3:9f857750e4e9 239 IF ( eb != BSP_INT_SUCCESS ) {
1050186 3:9f857750e4e9 240 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 241 goto fin;
1050186 3:9f857750e4e9 242 }
1050186 3:9f857750e4e9 243
1050186 3:9f857750e4e9 244 NCGVG_pRGPVG_Interrupt = NCG_NULL ;
1050186 3:9f857750e4e9 245 } else {
1050186 3:9f857750e4e9 246 NCG_DEBUG_MAKE_MSG_START( NCG_G_MASSAGE_BUFF, "[NCG][ERROR]NCGVG_Detach_ISR(2) Miss match function pointer.%s" )
1050186 3:9f857750e4e9 247 NCG_DEBUG_MAKE_MSG_PARAMETER( NCG_CRLF )
1050186 3:9f857750e4e9 248 NCG_DEBUG_MAKE_MSG_END();
1050186 3:9f857750e4e9 249 NCG_DEBUG_PRINT_MSG( NCG_G_MASSAGE_BUFF );
1050186 3:9f857750e4e9 250 rc_val = NCG_err_isr_management_failed;
1050186 3:9f857750e4e9 251 }
1050186 3:9f857750e4e9 252 }
1050186 3:9f857750e4e9 253
1050186 3:9f857750e4e9 254 fin:
1050186 3:9f857750e4e9 255 return rc_val;
1050186 3:9f857750e4e9 256 }
1050186 3:9f857750e4e9 257
1050186 3:9f857750e4e9 258
1050186 3:9f857750e4e9 259 /*=============================================================================
1050186 3:9f857750e4e9 260 * Internal functions
1050186 3:9f857750e4e9 261 */
1050186 3:9f857750e4e9 262
1050186 3:9f857750e4e9 263 /*-----------------------------------------------------------------------------
1050186 3:9f857750e4e9 264 NAME : NCGVG_RGPVG_ISR
1050186 3:9f857750e4e9 265 FUNCTION : The Interrrupt from OpenVG.
1050186 3:9f857750e4e9 266 PARAMETERS :
1050186 3:9f857750e4e9 267 RETURN : None.
1050186 3:9f857750e4e9 268 -----------------------------------------------------------------------------*/
1050186 3:9f857750e4e9 269 static void NCGVG_RGPVG_ISR(void)
1050186 3:9f857750e4e9 270 {
1050186 3:9f857750e4e9 271 NCGuint32 ret ;
1050186 3:9f857750e4e9 272 errnum_t e;
1050186 3:9f857750e4e9 273
1050186 3:9f857750e4e9 274 NCG_DEBUG_PRINT_STRING( "[LOG] NCGVG_RGPVG_ISR" );
1050186 3:9f857750e4e9 275
1050186 3:9f857750e4e9 276 if( NCGVG_pRGPVG_Interrupt == NCG_NULL ) {
1050186 3:9f857750e4e9 277 NCG_DEBUG_MAKE_MSG_START( NCG_G_MASSAGE_BUFF, "[NCG][INFO]NCGVG_RGPVG_ISR Not initialized.%s" )
1050186 3:9f857750e4e9 278 NCG_DEBUG_MAKE_MSG_PARAMETER( NCG_CRLF )
1050186 3:9f857750e4e9 279 NCG_DEBUG_MAKE_MSG_END();
1050186 3:9f857750e4e9 280 NCG_DEBUG_PRINT_MSG( NCG_G_MASSAGE_BUFF );
1050186 3:9f857750e4e9 281 } else {
1050186 3:9f857750e4e9 282 ret = NCGVG_pRGPVG_Interrupt() ;
1050186 3:9f857750e4e9 283 if ( ret != 0 ) {
1050186 3:9f857750e4e9 284 NCG_DEBUG_MAKE_MSG_START( NCG_G_MASSAGE_BUFF, "[NCG][ERROR]NCGVG_RGPVG_ISR(0x%08x)%s" )
1050186 3:9f857750e4e9 285 NCG_DEBUG_MAKE_MSG_PARAMETER( ret )
1050186 3:9f857750e4e9 286 NCG_DEBUG_MAKE_MSG_PARAMETER( NCG_CRLF )
1050186 3:9f857750e4e9 287 NCG_DEBUG_MAKE_MSG_END();
1050186 3:9f857750e4e9 288 NCG_DEBUG_PRINT_MSG( NCG_G_MASSAGE_BUFF );
1050186 3:9f857750e4e9 289 }
1050186 3:9f857750e4e9 290
1050186 3:9f857750e4e9 291 e= R_GRAPHICS_OnInterrupting();
1050186 3:9f857750e4e9 292 if ( e != 0 ) {
1050186 3:9f857750e4e9 293 NCG_DEBUG_MAKE_MSG_START( NCG_G_MASSAGE_BUFF, "[NCG][ERROR]NCGVG_RGPVG_ISR(e=0x%08x)%s" )
1050186 3:9f857750e4e9 294 NCG_DEBUG_MAKE_MSG_PARAMETER( e )
1050186 3:9f857750e4e9 295 NCG_DEBUG_MAKE_MSG_PARAMETER( NCG_CRLF )
1050186 3:9f857750e4e9 296 NCG_DEBUG_MAKE_MSG_END();
1050186 3:9f857750e4e9 297 NCG_DEBUG_PRINT_MSG( NCG_G_MASSAGE_BUFF );
1050186 3:9f857750e4e9 298 }
1050186 3:9f857750e4e9 299 }
1050186 3:9f857750e4e9 300
1050186 3:9f857750e4e9 301 return ;
1050186 3:9f857750e4e9 302 }
1050186 3:9f857750e4e9 303
1050186 3:9f857750e4e9 304 /*-----------------------------------------------------------------------------
1050186 3:9f857750e4e9 305 NAME : NCGVG_RGPVG_ISR_0
1050186 3:9f857750e4e9 306 FUNCTION : The Interrrupt from OpenVG.
1050186 3:9f857750e4e9 307 PARAMETERS :
1050186 3:9f857750e4e9 308 RETURN : None.
1050186 3:9f857750e4e9 309 -----------------------------------------------------------------------------*/
1050186 3:9f857750e4e9 310 static void NCGVG_RGPVG_ISR_0(void)
1050186 3:9f857750e4e9 311 {
1050186 3:9f857750e4e9 312 NCGVG_RGPVG_ISR();
1050186 3:9f857750e4e9 313
1050186 3:9f857750e4e9 314 GIC_EndInterrupt( BSP_INT_SRC_INT0 );
1050186 3:9f857750e4e9 315 }
1050186 3:9f857750e4e9 316
1050186 3:9f857750e4e9 317 /*-----------------------------------------------------------------------------
1050186 3:9f857750e4e9 318 NAME : NCGVG_RGPVG_ISR_1
1050186 3:9f857750e4e9 319 FUNCTION : The Interrrupt from OpenVG.
1050186 3:9f857750e4e9 320 PARAMETERS :
1050186 3:9f857750e4e9 321 RETURN : None.
1050186 3:9f857750e4e9 322 -----------------------------------------------------------------------------*/
1050186 3:9f857750e4e9 323 static void NCGVG_RGPVG_ISR_1(void)
1050186 3:9f857750e4e9 324 {
1050186 3:9f857750e4e9 325 NCGVG_RGPVG_ISR();
1050186 3:9f857750e4e9 326
1050186 3:9f857750e4e9 327 GIC_EndInterrupt( BSP_INT_SRC_INT1 );
1050186 3:9f857750e4e9 328 }
1050186 3:9f857750e4e9 329
1050186 3:9f857750e4e9 330 /*-----------------------------------------------------------------------------
1050186 3:9f857750e4e9 331 NAME : NCGVG_RGPVG_ISR_2
1050186 3:9f857750e4e9 332 FUNCTION : The Interrrupt from OpenVG.
1050186 3:9f857750e4e9 333 PARAMETERS :
1050186 3:9f857750e4e9 334 RETURN : None.
1050186 3:9f857750e4e9 335 -----------------------------------------------------------------------------*/
1050186 3:9f857750e4e9 336 static void NCGVG_RGPVG_ISR_2(void)
1050186 3:9f857750e4e9 337 {
1050186 3:9f857750e4e9 338 NCGVG_RGPVG_ISR();
1050186 3:9f857750e4e9 339
1050186 3:9f857750e4e9 340 GIC_EndInterrupt( BSP_INT_SRC_INT2 );
1050186 3:9f857750e4e9 341 }
1050186 3:9f857750e4e9 342
1050186 3:9f857750e4e9 343 /*-----------------------------------------------------------------------------
1050186 3:9f857750e4e9 344 NAME : NCGVG_RGPVG_ISR_3
1050186 3:9f857750e4e9 345 FUNCTION : The Interrrupt from OpenVG.
1050186 3:9f857750e4e9 346 PARAMETERS :
1050186 3:9f857750e4e9 347 RETURN : None.
1050186 3:9f857750e4e9 348 -----------------------------------------------------------------------------*/
1050186 3:9f857750e4e9 349 static void NCGVG_RGPVG_ISR_3(void)
1050186 3:9f857750e4e9 350 {
1050186 3:9f857750e4e9 351 NCGVG_RGPVG_ISR();
1050186 3:9f857750e4e9 352
1050186 3:9f857750e4e9 353 GIC_EndInterrupt( BSP_INT_SRC_INT3 );
1050186 3:9f857750e4e9 354 }
1050186 3:9f857750e4e9 355
1050186 3:9f857750e4e9 356 #endif
1050186 3:9f857750e4e9 357 /* -- end of file -- */