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
mcu_interrupts.c
00001 /******************************************************************************* 00002 * DISCLAIMER 00003 * This software is supplied by Renesas Electronics Corporation and is only 00004 * intended for use with Renesas products. No other uses are authorized. This 00005 * software is owned by Renesas Electronics Corporation and is protected under 00006 * all applicable laws, including copyright laws. 00007 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING 00008 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT 00009 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 00010 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. 00011 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS 00012 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE 00013 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR 00014 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE 00015 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 00016 * Renesas reserves the right, without notice, to make changes to this software 00017 * and to discontinue the availability of this software. By using this software, 00018 * you agree to the additional terms and conditions found by accessing the 00019 * following link: 00020 * http://www.renesas.com/disclaimer 00021 * Copyright (C) 2012 - 2015 Renesas Electronics Corporation. All rights reserved. 00022 *******************************************************************************/ 00023 /** 00024 * @file mcu_interrupts.c 00025 * @brief Interrupt related FIT BSP. 00026 * 00027 * $Module: OSPL $ $PublicVersion: 0.90 $ (=R_OSPL_VERSION) 00028 * $Rev: 35 $ 00029 * $Date:: 2014-04-15 21:38:18 +0900#$ 00030 */ 00031 00032 00033 /****************************************************************************** 00034 Includes <System Includes> , "Project Includes" 00035 ******************************************************************************/ 00036 #include "r_ospl.h" 00037 #include "mcu_interrupts.h" 00038 00039 00040 /****************************************************************************** 00041 Typedef definitions 00042 ******************************************************************************/ 00043 00044 /****************************************************************************** 00045 Macro definitions 00046 ******************************************************************************/ 00047 00048 /****************************************************************************** 00049 Imported global variables and functions (from other files) 00050 ******************************************************************************/ 00051 00052 /****************************************************************************** 00053 Exported global variables and functions (to be accessed by other files) 00054 ******************************************************************************/ 00055 00056 /****************************************************************************** 00057 Private global variables and functions 00058 ******************************************************************************/ 00059 00060 00061 /*********************************************************************** 00062 * Implement: R_BSP_InterruptWrite 00063 ************************************************************************/ 00064 bsp_int_err_t R_BSP_InterruptWrite( bsp_int_src_t const in_IRQ_Num, bsp_int_cb_t const in_Callback ) 00065 { 00066 uint32_t er; 00067 bsp_int_err_t eb; 00068 IRQn_Type irq; /* QAC 3441 */ 00069 00070 if ( in_Callback == FIT_NO_FUNC ) { 00071 irq = R_CAST_bsp_int_src_t_to_IRQn_Type( in_IRQ_Num ); 00072 er= InterruptHandlerUnregister( irq ); 00073 IF ( er != 0u ) { 00074 eb=BSP_INT_ERR_INVALID_ARG; 00075 goto fin; 00076 } 00077 } else { 00078 irq = R_CAST_bsp_int_src_t_to_IRQn_Type( in_IRQ_Num ); /* QAC 3441 */ 00079 er= InterruptHandlerRegister( irq, in_Callback ); 00080 IF ( er != 0u ) { 00081 eb=BSP_INT_ERR_INVALID_ARG; 00082 goto fin; 00083 } 00084 } 00085 00086 eb = BSP_INT_SUCCESS; 00087 fin: 00088 return eb; 00089 } 00090 00091 00092 /*********************************************************************** 00093 * Implement: R_BSP_InterruptRead 00094 ************************************************************************/ 00095 bsp_int_err_t R_BSP_InterruptRead( bsp_int_src_t const in_IRQ_Num, bsp_int_cb_t *const out_Callback ) 00096 { 00097 R_UNREFERENCED_VARIABLE_2( in_IRQ_Num, out_Callback ); 00098 return BSP_INT_ERR_UNSUPPORTED; 00099 } 00100 00101 00102 /*********************************************************************** 00103 * Implement: R_OSPL_OnInterruptForUnregistered 00104 ************************************************************************/ 00105 void R_OSPL_OnInterruptForUnregistered( uint32_t const int_sense ) 00106 { 00107 R_UNREFERENCED_VARIABLE( int_sense ); 00108 R_OSPL_RaiseUnrecoverable( E_OTHERS ); 00109 } 00110 00111 00112 /*********************************************************************** 00113 * Implement: R_BSP_InterruptControl 00114 ************************************************************************/ 00115 bsp_int_err_t R_BSP_InterruptControl( bsp_int_src_t const in_IRQ_Num, bsp_int_cmd_t const in_Command, 00116 void *const in_NotUsed ) 00117 { 00118 bsp_int_err_t eb; 00119 IRQn_Type irq; /* QAC 3441 */ 00120 00121 R_UNREFERENCED_VARIABLE( in_NotUsed ); 00122 R_IT_WILL_BE_NOT_CONST( in_NotUsed ); 00123 00124 switch ( in_Command ) { 00125 case BSP_INT_CMD_INTERRUPT_ENABLE: 00126 00127 irq = R_CAST_bsp_int_src_t_to_IRQn_Type( in_IRQ_Num ); 00128 GIC_EnableIRQ( irq ); 00129 break; 00130 00131 default: 00132 IF_DS( in_Command != BSP_INT_CMD_INTERRUPT_DISABLE ) { 00133 eb=BSP_INT_ERR_INVALID_ARG; 00134 goto fin; 00135 } 00136 00137 irq = R_CAST_bsp_int_src_t_to_IRQn_Type( in_IRQ_Num ); 00138 GIC_DisableIRQ( irq ); 00139 break; 00140 } 00141 00142 eb = BSP_INT_SUCCESS; 00143 fin: 00144 return eb; 00145 } 00146 00147
Generated on Tue Jul 12 2022 11:15:01 by 1.7.2