mbed library sources for airmote

Fork of mbed-src by mbed official

Committer:
zskdan
Date:
Tue Nov 24 14:02:46 2015 +0000
Revision:
625:88d3fa07e462
Parent:
390:35c2c1cf29cd
remove unused service

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 390:35c2c1cf29cd 1 /*******************************************************************************
mbed_official 390:35c2c1cf29cd 2 * DISCLAIMER
mbed_official 390:35c2c1cf29cd 3 * This software is supplied by Renesas Electronics Corporation and is only
mbed_official 390:35c2c1cf29cd 4 * intended for use with Renesas products. No other uses are authorized. This
mbed_official 390:35c2c1cf29cd 5 * software is owned by Renesas Electronics Corporation and is protected under
mbed_official 390:35c2c1cf29cd 6 * all applicable laws, including copyright laws.
mbed_official 390:35c2c1cf29cd 7 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
mbed_official 390:35c2c1cf29cd 8 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
mbed_official 390:35c2c1cf29cd 9 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
mbed_official 390:35c2c1cf29cd 10 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
mbed_official 390:35c2c1cf29cd 11 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
mbed_official 390:35c2c1cf29cd 12 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
mbed_official 390:35c2c1cf29cd 13 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
mbed_official 390:35c2c1cf29cd 14 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
mbed_official 390:35c2c1cf29cd 15 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
mbed_official 390:35c2c1cf29cd 16 * Renesas reserves the right, without notice, to make changes to this software
mbed_official 390:35c2c1cf29cd 17 * and to discontinue the availability of this software. By using this software,
mbed_official 390:35c2c1cf29cd 18 * you agree to the additional terms and conditions found by accessing the
mbed_official 390:35c2c1cf29cd 19 * following link:
mbed_official 390:35c2c1cf29cd 20 * http://www.renesas.com/disclaimer*
mbed_official 390:35c2c1cf29cd 21 * Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
mbed_official 390:35c2c1cf29cd 22 *******************************************************************************/
mbed_official 390:35c2c1cf29cd 23 /*******************************************************************************
mbed_official 390:35c2c1cf29cd 24 * File Name : pwm_iodefine.h
mbed_official 390:35c2c1cf29cd 25 * $Rev: $
mbed_official 390:35c2c1cf29cd 26 * $Date:: $
mbed_official 390:35c2c1cf29cd 27 * Description : Definition of I/O Register (V1.00a)
mbed_official 390:35c2c1cf29cd 28 ******************************************************************************/
mbed_official 390:35c2c1cf29cd 29 #ifndef PWM_IODEFINE_H
mbed_official 390:35c2c1cf29cd 30 #define PWM_IODEFINE_H
mbed_official 390:35c2c1cf29cd 31 /* ->MISRA 18.4 : Pack unpack union */ /* ->SEC M1.6.2 */
mbed_official 390:35c2c1cf29cd 32 /* ->SEC M1.10.1 : Not magic number */
mbed_official 390:35c2c1cf29cd 33
mbed_official 390:35c2c1cf29cd 34 union reg16_8_t
mbed_official 390:35c2c1cf29cd 35 {
mbed_official 390:35c2c1cf29cd 36 volatile uint16_t UINT16; /* 16-bit Access */
mbed_official 390:35c2c1cf29cd 37 volatile uint8_t UINT8[2]; /* 8-bit Access */
mbed_official 390:35c2c1cf29cd 38 };
mbed_official 390:35c2c1cf29cd 39
mbed_official 390:35c2c1cf29cd 40 struct st_pwm
mbed_official 390:35c2c1cf29cd 41 { /* PWM */
mbed_official 390:35c2c1cf29cd 42 volatile uint8_t dummy559[2]; /* */
mbed_official 390:35c2c1cf29cd 43 union reg16_8_t PWBTCR; /* PWBTCR */
mbed_official 390:35c2c1cf29cd 44
mbed_official 390:35c2c1cf29cd 45 volatile uint8_t dummy560[216]; /* */
mbed_official 390:35c2c1cf29cd 46
mbed_official 390:35c2c1cf29cd 47 /* start of struct st_pwm_common */
mbed_official 390:35c2c1cf29cd 48 union reg16_8_t PWCR_1; /* PWCR_1 */
mbed_official 390:35c2c1cf29cd 49
mbed_official 390:35c2c1cf29cd 50 volatile uint8_t dummy561[2]; /* */
mbed_official 390:35c2c1cf29cd 51 union reg16_8_t PWPR_1; /* PWPR_1 */
mbed_official 390:35c2c1cf29cd 52
mbed_official 390:35c2c1cf29cd 53 volatile uint16_t PWCYR_1; /* PWCYR_1 */
mbed_official 390:35c2c1cf29cd 54 volatile uint16_t PWBFR_1A; /* PWBFR_1A */
mbed_official 390:35c2c1cf29cd 55 volatile uint16_t PWBFR_1C; /* PWBFR_1C */
mbed_official 390:35c2c1cf29cd 56 volatile uint16_t PWBFR_1E; /* PWBFR_1E */
mbed_official 390:35c2c1cf29cd 57 volatile uint16_t PWBFR_1G; /* PWBFR_1G */
mbed_official 390:35c2c1cf29cd 58 /* end of struct st_pwm_common */
mbed_official 390:35c2c1cf29cd 59
mbed_official 390:35c2c1cf29cd 60 /* start of struct st_pwm_common */
mbed_official 390:35c2c1cf29cd 61 union reg16_8_t PWCR_2; /* PWCR_2 */
mbed_official 390:35c2c1cf29cd 62
mbed_official 390:35c2c1cf29cd 63 volatile uint8_t dummy562[2]; /* */
mbed_official 390:35c2c1cf29cd 64 union reg16_8_t PWPR_2; /* PWPR_2 */
mbed_official 390:35c2c1cf29cd 65
mbed_official 390:35c2c1cf29cd 66 volatile uint16_t PWCYR_2; /* PWCYR_2 */
mbed_official 390:35c2c1cf29cd 67 volatile uint16_t PWBFR_2A; /* PWBFR_2A */
mbed_official 390:35c2c1cf29cd 68 volatile uint16_t PWBFR_2C; /* PWBFR_2C */
mbed_official 390:35c2c1cf29cd 69 volatile uint16_t PWBFR_2E; /* PWBFR_2E */
mbed_official 390:35c2c1cf29cd 70 volatile uint16_t PWBFR_2G; /* PWBFR_2G */
mbed_official 390:35c2c1cf29cd 71 /* end of struct st_pwm_common */
mbed_official 390:35c2c1cf29cd 72 };
mbed_official 390:35c2c1cf29cd 73
mbed_official 390:35c2c1cf29cd 74
mbed_official 390:35c2c1cf29cd 75 struct st_pwm_common
mbed_official 390:35c2c1cf29cd 76 {
mbed_official 390:35c2c1cf29cd 77 union reg16_8_t PWCR_1; /* PWCR_1 */
mbed_official 390:35c2c1cf29cd 78
mbed_official 390:35c2c1cf29cd 79 volatile uint8_t dummy572[2]; /* */
mbed_official 390:35c2c1cf29cd 80 union reg16_8_t PWPR_1; /* PWPR_1 */
mbed_official 390:35c2c1cf29cd 81
mbed_official 390:35c2c1cf29cd 82 volatile uint16_t PWCYR_1; /* PWCYR_1 */
mbed_official 390:35c2c1cf29cd 83 volatile uint16_t PWBFR_1A; /* PWBFR_1A */
mbed_official 390:35c2c1cf29cd 84 volatile uint16_t PWBFR_1C; /* PWBFR_1C */
mbed_official 390:35c2c1cf29cd 85 volatile uint16_t PWBFR_1E; /* PWBFR_1E */
mbed_official 390:35c2c1cf29cd 86 volatile uint16_t PWBFR_1G; /* PWBFR_1G */
mbed_official 390:35c2c1cf29cd 87 };
mbed_official 390:35c2c1cf29cd 88
mbed_official 390:35c2c1cf29cd 89
mbed_official 390:35c2c1cf29cd 90 #define PWM (*(struct st_pwm *)0xFCFF5004uL) /* PWM */
mbed_official 390:35c2c1cf29cd 91
mbed_official 390:35c2c1cf29cd 92
mbed_official 390:35c2c1cf29cd 93 /* Start of channnel array defines of PWM */
mbed_official 390:35c2c1cf29cd 94
mbed_official 390:35c2c1cf29cd 95 /* Channnel array defines of PWMn */
mbed_official 390:35c2c1cf29cd 96 /*(Sample) value = PWMn[ channel ]->PWCR_1.UINT16; */
mbed_official 390:35c2c1cf29cd 97 #define PWMn_COUNT 2
mbed_official 390:35c2c1cf29cd 98 #define PWMn_ADDRESS_LIST \
mbed_official 390:35c2c1cf29cd 99 { /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
mbed_official 390:35c2c1cf29cd 100 &PWM1, &PWM2 \
mbed_official 390:35c2c1cf29cd 101 } /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
mbed_official 390:35c2c1cf29cd 102 #define PWM1 (*(struct st_pwm_common *)&PWM.PWCR_1) /* PWM1 */
mbed_official 390:35c2c1cf29cd 103 #define PWM2 (*(struct st_pwm_common *)&PWM.PWCR_2) /* PWM2 */
mbed_official 390:35c2c1cf29cd 104
mbed_official 390:35c2c1cf29cd 105 /* End of channnel array defines of PWM */
mbed_official 390:35c2c1cf29cd 106
mbed_official 390:35c2c1cf29cd 107
mbed_official 390:35c2c1cf29cd 108 #define PWMPWBTCR PWM.PWBTCR.UINT16
mbed_official 390:35c2c1cf29cd 109 #define PWMPWBTCR_BYTE_L PWM.PWBTCR.UINT8[0]
mbed_official 390:35c2c1cf29cd 110 #define PWMPWBTCR_BYTE_H PWM.PWBTCR.UINT8[1]
mbed_official 390:35c2c1cf29cd 111 #define PWMPWCR_1 PWM.PWCR_1.UINT16
mbed_official 390:35c2c1cf29cd 112 #define PWMPWCR_1_BYTE_L PWM.PWCR_1.UINT8[0]
mbed_official 390:35c2c1cf29cd 113 #define PWMPWCR_1_BYTE_H PWM.PWCR_1.UINT8[1]
mbed_official 390:35c2c1cf29cd 114 #define PWMPWPR_1 PWM.PWPR_1.UINT16
mbed_official 390:35c2c1cf29cd 115 #define PWMPWPR_1_BYTE_L PWM.PWPR_1.UINT8[0]
mbed_official 390:35c2c1cf29cd 116 #define PWMPWPR_1_BYTE_H PWM.PWPR_1.UINT8[1]
mbed_official 390:35c2c1cf29cd 117 #define PWMPWCYR_1 PWM.PWCYR_1
mbed_official 390:35c2c1cf29cd 118 #define PWMPWBFR_1A PWM.PWBFR_1A
mbed_official 390:35c2c1cf29cd 119 #define PWMPWBFR_1C PWM.PWBFR_1C
mbed_official 390:35c2c1cf29cd 120 #define PWMPWBFR_1E PWM.PWBFR_1E
mbed_official 390:35c2c1cf29cd 121 #define PWMPWBFR_1G PWM.PWBFR_1G
mbed_official 390:35c2c1cf29cd 122 #define PWMPWCR_2 PWM.PWCR_2.UINT16
mbed_official 390:35c2c1cf29cd 123 #define PWMPWCR_2_BYTE_L PWM.PWCR_2.UINT8[0]
mbed_official 390:35c2c1cf29cd 124 #define PWMPWCR_2_BYTE_H PWM.PWCR_2.UINT8[1]
mbed_official 390:35c2c1cf29cd 125 #define PWMPWPR_2 PWM.PWPR_2.UINT16
mbed_official 390:35c2c1cf29cd 126 #define PWMPWPR_2_BYTE_L PWM.PWPR_2.UINT8[0]
mbed_official 390:35c2c1cf29cd 127 #define PWMPWPR_2_BYTE_H PWM.PWPR_2.UINT8[1]
mbed_official 390:35c2c1cf29cd 128 #define PWMPWCYR_2 PWM.PWCYR_2
mbed_official 390:35c2c1cf29cd 129 #define PWMPWBFR_2A PWM.PWBFR_2A
mbed_official 390:35c2c1cf29cd 130 #define PWMPWBFR_2C PWM.PWBFR_2C
mbed_official 390:35c2c1cf29cd 131 #define PWMPWBFR_2E PWM.PWBFR_2E
mbed_official 390:35c2c1cf29cd 132 #define PWMPWBFR_2G PWM.PWBFR_2G
mbed_official 390:35c2c1cf29cd 133 /* <-SEC M1.10.1 */
mbed_official 390:35c2c1cf29cd 134 /* <-MISRA 18.4 */ /* <-SEC M1.6.2 */
mbed_official 390:35c2c1cf29cd 135 #endif