lib

Fork of mbed-dev by mbed official

Committer:
<>
Date:
Fri Oct 28 11:17:30 2016 +0100
Revision:
149:156823d33999
This updates the lib to the mbed lib v128

NOTE: This release includes a restructuring of the file and directory locations and thus some
include paths in your code may need updating accordingly.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 149:156823d33999 1 /**
<> 149:156823d33999 2 ******************************************************************************
<> 149:156823d33999 3 * @file pad_map.h
<> 149:156823d33999 4 * @brief PAD hw module register map
<> 149:156823d33999 5 * @internal
<> 149:156823d33999 6 * @author ON Semiconductor
<> 149:156823d33999 7 * $Rev: 3166 $
<> 149:156823d33999 8 * $Date: 2015-01-19 11:28:08 +0530 (Mon, 19 Jan 2015) $
<> 149:156823d33999 9 ******************************************************************************
<> 149:156823d33999 10 * Copyright 2016 Semiconductor Components Industries LLC (d/b/a “ON Semiconductor”).
<> 149:156823d33999 11 * All rights reserved. This software and/or documentation is licensed by ON Semiconductor
<> 149:156823d33999 12 * under limited terms and conditions. The terms and conditions pertaining to the software
<> 149:156823d33999 13 * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf
<> 149:156823d33999 14 * (“ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software”) and
<> 149:156823d33999 15 * if applicable the software license agreement. Do not use this software and/or
<> 149:156823d33999 16 * documentation unless you have carefully read and you agree to the limited terms and
<> 149:156823d33999 17 * conditions. By using this software and/or documentation, you agree to the limited
<> 149:156823d33999 18 * terms and conditions.
<> 149:156823d33999 19 *
<> 149:156823d33999 20 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
<> 149:156823d33999 21 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
<> 149:156823d33999 22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
<> 149:156823d33999 23 * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL,
<> 149:156823d33999 24 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
<> 149:156823d33999 25 * @endinternal
<> 149:156823d33999 26 *
<> 149:156823d33999 27 * @ingroup pad
<> 149:156823d33999 28 *
<> 149:156823d33999 29 * @details
<> 149:156823d33999 30 */
<> 149:156823d33999 31
<> 149:156823d33999 32 #ifndef PAD_MAP_H_
<> 149:156823d33999 33 #define PAD_MAP_H_
<> 149:156823d33999 34
<> 149:156823d33999 35 /*************************************************************************************************
<> 149:156823d33999 36 * *
<> 149:156823d33999 37 * Header files *
<> 149:156823d33999 38 * *
<> 149:156823d33999 39 *************************************************************************************************/
<> 149:156823d33999 40
<> 149:156823d33999 41 #include "architecture.h"
<> 149:156823d33999 42
<> 149:156823d33999 43 /*************************************************************************************************
<> 149:156823d33999 44 * *
<> 149:156823d33999 45 * Symbolic Constants *
<> 149:156823d33999 46 * *
<> 149:156823d33999 47 *************************************************************************************************/
<> 149:156823d33999 48
<> 149:156823d33999 49 /** no pull up nor pull down */
<> 149:156823d33999 50 #define PAD_PULL_NONE (uint8_t)0x01
<> 149:156823d33999 51 /** pull down */
<> 149:156823d33999 52 #define PAD_PULL_DOWN (uint8_t)0x00
<> 149:156823d33999 53 /** pull up */
<> 149:156823d33999 54 #define PAD_PULL_UP (uint8_t)0x03
<> 149:156823d33999 55
<> 149:156823d33999 56 /** Drive strength */
<> 149:156823d33999 57 #define PAD_DRIVE_L0 (uint8_t)0x00
<> 149:156823d33999 58 #define PAD_DRIVE_L1 (uint8_t)0x01
<> 149:156823d33999 59 #define PAD_DRIVE_L2 (uint8_t)0x02
<> 149:156823d33999 60 #define PAD_DRIVE_L3 (uint8_t)0x03
<> 149:156823d33999 61 #define PAD_DRIVE_L4 (uint8_t)0x04
<> 149:156823d33999 62 #define PAD_DRIVE_L5 (uint8_t)0x05
<> 149:156823d33999 63 #define PAD_DRIVE_L6 (uint8_t)0x06
<> 149:156823d33999 64
<> 149:156823d33999 65 /** output configuration push/pull */
<> 149:156823d33999 66 #define PAD_OUTCFG_PUSHPULL (uint8_t)0x00
<> 149:156823d33999 67 /** output configuration open drain */
<> 149:156823d33999 68 #define PAD_OOUTCFG_OPENDRAIN (uint8_t)0x01
<> 149:156823d33999 69
<> 149:156823d33999 70 /** lowest power PAD configuration, shall be the default */
<> 149:156823d33999 71 #define PAD_LOW_POWER (PAD_PULL_NONE | (PAD_DRIVE_L0<<2) | (PAD_OOUTCFG_OPENDRAIN<<5))
<> 149:156823d33999 72
<> 149:156823d33999 73 /** custom Power PAD configuration */
<> 149:156823d33999 74 #ifdef REVD
<> 149:156823d33999 75 #define PAD_OUTPUT_PN_L1_OD (PAD_PULL_NONE | (PAD_DRIVE_L1<<2) | (PAD_OOUTCFG_OPENDRAIN<<5))
<> 149:156823d33999 76 #define PAD_INPUT_PD_L1_PP (PAD_PULL_DOWN | (PAD_DRIVE_L1<<2) | (PAD_OUTCFG_PUSHPULL<<5))
<> 149:156823d33999 77 #define PAD_UNUSED_PD_L0_PP (PAD_PULL_DOWN | (PAD_DRIVE_L0<<2) | (PAD_OUTCFG_PUSHPULL<<5))
<> 149:156823d33999 78
<> 149:156823d33999 79 #define PAD_UART_TX (PAD_PULL_UP | (PAD_DRIVE_L1<<2) | (PAD_OUTCFG_PUSHPULL<<5))
<> 149:156823d33999 80 #define PAD_UART_RX (PAD_PULL_UP | (PAD_DRIVE_L1<<2) | (PAD_OOUTCFG_OPENDRAIN<<5))
<> 149:156823d33999 81 #endif /* REVD */
<> 149:156823d33999 82
<> 149:156823d33999 83 /**************************************************************************************************
<> 149:156823d33999 84 * *
<> 149:156823d33999 85 * Type definitions *
<> 149:156823d33999 86 * *
<> 149:156823d33999 87 **************************************************************************************************/
<> 149:156823d33999 88
<> 149:156823d33999 89 /** Pad control
<> 149:156823d33999 90 * The pad control peripheral is used to setup any necessary pad parameters
<> 149:156823d33999 91 * not controlled directly via the cross-bar: output drive strength,
<> 149:156823d33999 92 * push/pull control and output drive type.
<> 149:156823d33999 93 */
<> 149:156823d33999 94 typedef struct {
<> 149:156823d33999 95 union {
<> 149:156823d33999 96 struct {
<> 149:156823d33999 97 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 98 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 99 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 100 } BITS;
<> 149:156823d33999 101 __IO uint32_t WORD;
<> 149:156823d33999 102 } PADIO0;
<> 149:156823d33999 103 union {
<> 149:156823d33999 104 struct {
<> 149:156823d33999 105 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 106 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 107 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 108 } BITS;
<> 149:156823d33999 109 __IO uint32_t WORD;
<> 149:156823d33999 110 } PADIO1;
<> 149:156823d33999 111 union {
<> 149:156823d33999 112 struct {
<> 149:156823d33999 113 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 114 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 115 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 116 } BITS;
<> 149:156823d33999 117 __IO uint32_t WORD;
<> 149:156823d33999 118 } PADIO2;
<> 149:156823d33999 119 union {
<> 149:156823d33999 120 struct {
<> 149:156823d33999 121 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 122 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 123 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 124 } BITS;
<> 149:156823d33999 125 __IO uint32_t WORD;
<> 149:156823d33999 126 } PADIO3;
<> 149:156823d33999 127 union {
<> 149:156823d33999 128 struct {
<> 149:156823d33999 129 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 130 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 131 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 132 } BITS;
<> 149:156823d33999 133 __IO uint32_t WORD;
<> 149:156823d33999 134 } PADIO4;
<> 149:156823d33999 135 union {
<> 149:156823d33999 136 struct {
<> 149:156823d33999 137 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 138 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 139 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 140 } BITS;
<> 149:156823d33999 141 __IO uint32_t WORD;
<> 149:156823d33999 142 } PADIO5;
<> 149:156823d33999 143 union {
<> 149:156823d33999 144 struct {
<> 149:156823d33999 145 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 146 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 147 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 148 } BITS;
<> 149:156823d33999 149 __IO uint32_t WORD;
<> 149:156823d33999 150 } PADIO6;
<> 149:156823d33999 151 union {
<> 149:156823d33999 152 struct {
<> 149:156823d33999 153 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 154 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 155 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 156 } BITS;
<> 149:156823d33999 157 __IO uint32_t WORD;
<> 149:156823d33999 158 } PADIO7;
<> 149:156823d33999 159 union {
<> 149:156823d33999 160 struct {
<> 149:156823d33999 161 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 162 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 163 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 164 } BITS;
<> 149:156823d33999 165 __IO uint32_t WORD;
<> 149:156823d33999 166 } PADIO8;
<> 149:156823d33999 167 union {
<> 149:156823d33999 168 struct {
<> 149:156823d33999 169 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 170 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 171 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 172 } BITS;
<> 149:156823d33999 173 __IO uint32_t WORD;
<> 149:156823d33999 174 } PADIO9;
<> 149:156823d33999 175 union {
<> 149:156823d33999 176 struct {
<> 149:156823d33999 177 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 178 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 179 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 180 } BITS;
<> 149:156823d33999 181 __IO uint32_t WORD;
<> 149:156823d33999 182 } PADIO10;
<> 149:156823d33999 183 union {
<> 149:156823d33999 184 struct {
<> 149:156823d33999 185 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 186 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 187 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 188 } BITS;
<> 149:156823d33999 189 __IO uint32_t WORD;
<> 149:156823d33999 190 } PADIO11;
<> 149:156823d33999 191 union {
<> 149:156823d33999 192 struct {
<> 149:156823d33999 193 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 194 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 195 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 196 } BITS;
<> 149:156823d33999 197 __IO uint32_t WORD;
<> 149:156823d33999 198 } PADIO12;
<> 149:156823d33999 199 union {
<> 149:156823d33999 200 struct {
<> 149:156823d33999 201 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 202 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 203 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 204 } BITS;
<> 149:156823d33999 205 __IO uint32_t WORD;
<> 149:156823d33999 206 } PADIO13;
<> 149:156823d33999 207 union {
<> 149:156823d33999 208 struct {
<> 149:156823d33999 209 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 210 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 211 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 212 } BITS;
<> 149:156823d33999 213 __IO uint32_t WORD;
<> 149:156823d33999 214 } PADIO14;
<> 149:156823d33999 215 union {
<> 149:156823d33999 216 struct {
<> 149:156823d33999 217 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 218 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 219 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 220 } BITS;
<> 149:156823d33999 221 __IO uint32_t WORD;
<> 149:156823d33999 222 } PADIO15;
<> 149:156823d33999 223 union {
<> 149:156823d33999 224 struct {
<> 149:156823d33999 225 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 226 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 227 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 228 } BITS;
<> 149:156823d33999 229 __IO uint32_t WORD;
<> 149:156823d33999 230 } PADIO16;
<> 149:156823d33999 231 union {
<> 149:156823d33999 232 struct {
<> 149:156823d33999 233 __IO uint32_t PULL :2; /**< 00 – Pull-down active, 01 – No pull active, 10 – No pull active, 11 – Pull-up active*/
<> 149:156823d33999 234 __IO uint32_t POWER :3; /**< Output Drive Strength*/
<> 149:156823d33999 235 __IO uint32_t TYPE :1; /**< Output Type: 0 – Push/Pull, 1 – Open Drain*/
<> 149:156823d33999 236 } BITS;
<> 149:156823d33999 237 __IO uint32_t WORD;
<> 149:156823d33999 238 } PADIO17;
<> 149:156823d33999 239 } PadReg_t, *PadReg_pt;
<> 149:156823d33999 240
<> 149:156823d33999 241 #endif /* PAD_MAP_H_ */