1 /*******************************************************************************
\r
3 * This software is supplied by Renesas Electronics Corporation and is only
\r
4 * intended for use with Renesas products. No other uses are authorized. This
\r
5 * software is owned by Renesas Electronics Corporation and is protected under
\r
6 * all applicable laws, including copyright laws.
\r
7 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
\r
8 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
\r
9 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
\r
10 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
\r
11 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
\r
12 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
\r
13 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
\r
14 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
\r
15 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
\r
16 * Renesas reserves the right, without notice, to make changes to this software
\r
17 * and to discontinue the availability of this software. By using this software,
\r
18 * you agree to the additional terms and conditions found by accessing the
\r
20 * http://www.renesas.com/disclaimer
\r
22 * Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved.
\r
23 *******************************************************************************/
\r
24 /*******************************************************************************
\r
25 * File Name : ostm_userdef.c
\r
28 * Device(s) : Aragon
\r
29 * Tool-Chain : DS-5 Ver 5.13
\r
32 * H/W Platform : Aragon CPU Board
\r
33 * Description : Aragon Sample Program - OS timer device driver (User define function)
\r
36 *******************************************************************************/
\r
38 /******************************************************************************
\r
39 Includes <System Includes> , "Project Includes"
\r
40 ******************************************************************************/
\r
41 #include "r_typedefs.h"
\r
42 #include "dev_drv.h" /* Device Driver common header */
\r
43 #include "devdrv_ostm.h" /* OSTM Driver header */
\r
44 #include "devdrv_intc.h" /* INTC Driver Header */
\r
45 #include "iodefine.h"
\r
48 /******************************************************************************
\r
50 ******************************************************************************/
\r
52 /******************************************************************************
\r
54 ******************************************************************************/
\r
55 #define P0_CLOCK_FREQUENCY_kHz (33.333 * 1000) /* 33.333MHz */
\r
56 #define MAX_CYCLE_msec (0xFFFFFFFF / P0_CLOCK_FREQUENCY_kHz)
\r
58 /******************************************************************************
\r
59 Exported global variables and functions (to be accessed by other files)
\r
60 ******************************************************************************/
\r
62 /******************************************************************************
\r
63 Private global variables and functions
\r
64 ******************************************************************************/
\r
65 static volatile uint8_t ostm_int_flg;
\r
67 /******************************************************************************
\r
68 * Function Name: Userdef_OSTM0_Init
\r
70 * Arguments : uint32_t mode
\r
72 * Return Value : DEVDRV_SUCCESS
\r
74 ******************************************************************************/
\r
75 int32_t Userdef_OSTM0_Init(uint32_t mode, uint32_t cycle)
\r
77 return DEVDRV_SUCCESS;
\r
80 /******************************************************************************
\r
81 * Function Name: Userdef_OSTM1_Init
\r
83 * Arguments : uint32_t mode
\r
85 * Return Value : DEVDRV_SUCCESS
\r
87 ******************************************************************************/
\r
88 int32_t Userdef_OSTM1_Init(uint32_t mode, uint32_t cycle)
\r
93 /******************************************************************************
\r
94 * Function Name: Userdef_OSTM0_Int
\r
97 * Return Value : none
\r
98 ******************************************************************************/
\r
99 void Userdef_OSTM0_Int(void)
\r
103 /******************************************************************************
\r
104 * Function Name: Userdef_OSTM1_Int
\r
107 * Return Value : none
\r
108 ******************************************************************************/
\r
109 void Userdef_OSTM1_Int(void)
\r
113 /******************************************************************************
\r
114 * Function Name: Userdef_OSTM0_WaitInt
\r
117 * Return Value : none
\r
118 ******************************************************************************/
\r
119 void Userdef_OSTM0_WaitInt(void)
\r
123 /******************************************************************************
\r
124 * Function Name: Userdef_OSTM1_WaitInt
\r
127 * Return Value : none
\r
128 ******************************************************************************/
\r
129 void Userdef_OSTM1_WaitInt(void)
\r