[374] | 1 | /*******************************************************************************
|
---|
| 2 | * DISCLAIMER
|
---|
| 3 | * This software is supplied by Renesas Electronics Corporation and is only
|
---|
| 4 | * intended for use with Renesas products. No other uses are authorized. This
|
---|
| 5 | * software is owned by Renesas Electronics Corporation and is protected under
|
---|
| 6 | * all applicable laws, including copyright laws.
|
---|
| 7 | * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
|
---|
| 8 | * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
|
---|
| 9 | * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
|
---|
| 10 | * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
|
---|
| 11 | * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
|
---|
| 12 | * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
|
---|
| 13 | * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
|
---|
| 14 | * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
|
---|
| 15 | * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
---|
| 16 | * Renesas reserves the right, without notice, to make changes to this software
|
---|
| 17 | * and to discontinue the availability of this software. By using this software,
|
---|
| 18 | * you agree to the additional terms and conditions found by accessing the
|
---|
| 19 | * following link:
|
---|
| 20 | * http://www.renesas.com/disclaimer*
|
---|
| 21 | * Copyright (C) 2013-2015 Renesas Electronics Corporation. All rights reserved.
|
---|
| 22 | *******************************************************************************/
|
---|
| 23 | /*******************************************************************************
|
---|
| 24 | * File Name : iodefine_typedef.h
|
---|
| 25 | * $Rev: $
|
---|
| 26 | * $Date:: $
|
---|
| 27 | * Description : Definition of I/O Register for RZ/A1H,M (V2.00h)
|
---|
| 28 | ******************************************************************************/
|
---|
| 29 | #ifndef IODEFINE_TYPEDEF_H
|
---|
| 30 | #define IODEFINE_TYPEDEF_H
|
---|
| 31 | /* ->QAC 0639 : Over 127 members (C90) */
|
---|
| 32 | /* ->QAC 0857 : Over 1024 #define (C90) */
|
---|
| 33 | /* ->MISRA 18.4 : Pack unpack union */ /* ->SEC M1.6.2 */
|
---|
| 34 | /* ->SEC M1.10.1 : Not magic number */
|
---|
| 35 |
|
---|
| 36 | /* Shared types and macros for iodefine.h */
|
---|
| 37 |
|
---|
| 38 | /***********************************************************************
|
---|
| 39 | * Macro: IODEFINE_H_VERSION
|
---|
| 40 | ************************************************************************/
|
---|
| 41 | #define IODEFINE_H_VERSION (200)
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | /***********************************************************************
|
---|
| 45 | * Enum: iodefine_byte_select_t
|
---|
| 46 | *
|
---|
| 47 | * R_IO_L - Low 16bit or Low 8 bit
|
---|
| 48 | * R_IO_H - High 16bit or Low 8 bit
|
---|
| 49 | * R_IO_LL - Low 8 bit
|
---|
| 50 | * R_IO_LH - Middle Low 8 bit
|
---|
| 51 | * R_IO_HL - Middle High 8 bit
|
---|
| 52 | * R_IO_HH - High 8 bit
|
---|
| 53 | ************************************************************************/
|
---|
| 54 | typedef enum iodefine_byte_select_t
|
---|
| 55 | {
|
---|
| 56 | R_IO_L = 0, R_IO_H = 1,
|
---|
| 57 | R_IO_LL= 0, R_IO_LH = 1, R_IO_HL = 2, R_IO_HH = 3,
|
---|
| 58 | L = 0, H = 1,
|
---|
| 59 | LL= 0, LH = 1, HL = 2, HH = 3
|
---|
| 60 | } iodefine_byte_select_t;
|
---|
| 61 |
|
---|
| 62 |
|
---|
| 63 | /***********************************************************************
|
---|
| 64 | * Type: iodefine_reg32_t
|
---|
| 65 | * 32/16/8 bit access register
|
---|
| 66 | *
|
---|
| 67 | * - Padding : sizeof(iodefine_reg32_t) == 4
|
---|
| 68 | * - Alignment(Offset) : &UINT32==0, &UINT16[0]==0, &UINT16[1]==2
|
---|
| 69 | * &UINT8[0]==0, &UINT8[1]==1, &UINT8[2]==2, &UINT8[3]==3
|
---|
| 70 | * - Endian : Independent (Same as CPU endian as register endian)
|
---|
| 71 | * - Bit-Order : Independent
|
---|
| 72 | ************************************************************************/
|
---|
| 73 | typedef union iodefine_reg32_t
|
---|
| 74 | {
|
---|
| 75 | volatile uint32_t UINT32; /* 32-bit Access */
|
---|
| 76 | volatile uint16_t UINT16[2]; /* 16-bit Access */
|
---|
| 77 | volatile uint8_t UINT8[4]; /* 8-bit Access */
|
---|
| 78 | } iodefine_reg32_t;
|
---|
| 79 |
|
---|
| 80 |
|
---|
| 81 | /***********************************************************************
|
---|
| 82 | * Type: iodefine_reg32_16_t
|
---|
| 83 | * 32/16 bit access register
|
---|
| 84 | *
|
---|
| 85 | * - Padding : sizeof(iodefine_reg32_16_t) == 4
|
---|
| 86 | * - Alignment(Offset) : &UINT32==0, &UINT16[0]==0, &UINT16[1]==2
|
---|
| 87 | * - Endian : Independent (Same as CPU endian as register endian)
|
---|
| 88 | * - Bit-Order : Independent
|
---|
| 89 | ************************************************************************/
|
---|
| 90 | typedef union iodefine_reg32_16_t
|
---|
| 91 | {
|
---|
| 92 | volatile uint32_t UINT32; /* 32-bit Access */
|
---|
| 93 | volatile uint16_t UINT16[2]; /* 16-bit Access */
|
---|
| 94 | } iodefine_reg32_16_t;
|
---|
| 95 |
|
---|
| 96 |
|
---|
| 97 | /***********************************************************************
|
---|
| 98 | * Type: iodefine_reg16_8_t
|
---|
| 99 | * 16/8 bit access register
|
---|
| 100 | *
|
---|
| 101 | * - Padding : sizeof(iodefine_reg16_8_t) == 2
|
---|
| 102 | * - Alignment(Offset) : &UINT16==0, &UINT8[0]==0, &UINT8[1]==1
|
---|
| 103 | * - Endian : Independent (Same as CPU endian as register endian)
|
---|
| 104 | * - Bit-Order : Independent
|
---|
| 105 | ************************************************************************/
|
---|
| 106 | typedef union iodefine_reg16_8_t
|
---|
| 107 | {
|
---|
| 108 | volatile uint16_t UINT16; /* 16-bit Access */
|
---|
| 109 | volatile uint8_t UINT8[2]; /* 8-bit Access */
|
---|
| 110 | } iodefine_reg16_8_t;
|
---|
| 111 |
|
---|
| 112 |
|
---|
| 113 | /* End of shared types and macros for iodefine.h */
|
---|
| 114 | /* <-SEC M1.10.1 */
|
---|
| 115 | /* <-MISRA 18.4 */ /* <-SEC M1.6.2 */
|
---|
| 116 | /* <-QAC 0857 */
|
---|
| 117 | /* <-QAC 0639 */
|
---|
| 118 | #endif
|
---|