lib
Fork of mbed-dev by
targets/TARGET_RENESAS/TARGET_RZ_A1H/PinNames.h@149:156823d33999, 2016-10-28 (annotated)
- Committer:
- <>
- Date:
- Fri Oct 28 11:17:30 2016 +0100
- Revision:
- 149:156823d33999
- Parent:
- targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PinNames.h@144:ef7eb2e8f9f7
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?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 144:ef7eb2e8f9f7 | 1 | /* mbed Microcontroller Library |
<> | 144:ef7eb2e8f9f7 | 2 | * Copyright (c) 2006-2013 ARM Limited |
<> | 144:ef7eb2e8f9f7 | 3 | * |
<> | 144:ef7eb2e8f9f7 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
<> | 144:ef7eb2e8f9f7 | 5 | * you may not use this file except in compliance with the License. |
<> | 144:ef7eb2e8f9f7 | 6 | * You may obtain a copy of the License at |
<> | 144:ef7eb2e8f9f7 | 7 | * |
<> | 144:ef7eb2e8f9f7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
<> | 144:ef7eb2e8f9f7 | 9 | * |
<> | 144:ef7eb2e8f9f7 | 10 | * Unless required by applicable law or agreed to in writing, software |
<> | 144:ef7eb2e8f9f7 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
<> | 144:ef7eb2e8f9f7 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<> | 144:ef7eb2e8f9f7 | 13 | * See the License for the specific language governing permissions and |
<> | 144:ef7eb2e8f9f7 | 14 | * limitations under the License. |
<> | 144:ef7eb2e8f9f7 | 15 | */ |
<> | 144:ef7eb2e8f9f7 | 16 | #ifndef MBED_PINNAMES_H |
<> | 144:ef7eb2e8f9f7 | 17 | #define MBED_PINNAMES_H |
<> | 144:ef7eb2e8f9f7 | 18 | |
<> | 144:ef7eb2e8f9f7 | 19 | #include "cmsis.h" |
<> | 144:ef7eb2e8f9f7 | 20 | |
<> | 144:ef7eb2e8f9f7 | 21 | #ifdef __cplusplus |
<> | 144:ef7eb2e8f9f7 | 22 | extern "C" { |
<> | 144:ef7eb2e8f9f7 | 23 | #endif |
<> | 144:ef7eb2e8f9f7 | 24 | |
<> | 144:ef7eb2e8f9f7 | 25 | typedef enum { |
<> | 144:ef7eb2e8f9f7 | 26 | PIN_INPUT, |
<> | 144:ef7eb2e8f9f7 | 27 | PIN_OUTPUT |
<> | 144:ef7eb2e8f9f7 | 28 | } PinDirection; |
<> | 144:ef7eb2e8f9f7 | 29 | |
<> | 144:ef7eb2e8f9f7 | 30 | #define PORT_SHIFT 4 |
<> | 144:ef7eb2e8f9f7 | 31 | |
<> | 144:ef7eb2e8f9f7 | 32 | typedef enum { |
<> | 144:ef7eb2e8f9f7 | 33 | P0_0 = 0, |
<> | 144:ef7eb2e8f9f7 | 34 | P0_1, P0_2, P0_3, P0_4, P0_5,_P0_6,_P0_7,_P0_8,_P0_9,_P0_10,_P0_11,_P0_12,_P0_13,_P0_14,_P0_15, |
<> | 144:ef7eb2e8f9f7 | 35 | P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, |
<> | 144:ef7eb2e8f9f7 | 36 | P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15, |
<> | 144:ef7eb2e8f9f7 | 37 | P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7, P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15, |
<> | 144:ef7eb2e8f9f7 | 38 | P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7, P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15, |
<> | 144:ef7eb2e8f9f7 | 39 | P5_0, P5_1, P5_2, P5_3, P5_4, P5_5, P5_6, P5_7, P5_8, P5_9, P5_10, P5_11, P5_12, P5_13, P5_14, P5_15, |
<> | 144:ef7eb2e8f9f7 | 40 | P6_0, P6_1, P6_2, P6_3, P6_4, P6_5, P6_6, P6_7, P6_8, P6_9, P6_10, P6_11, P6_12, P6_13, P6_14, P6_15, |
<> | 144:ef7eb2e8f9f7 | 41 | P7_0, P7_1, P7_2, P7_3, P7_4, P7_5, P7_6, P7_7, P7_8, P7_9, P7_10, P7_11, P7_12, P7_13, P7_14, P7_15, |
<> | 144:ef7eb2e8f9f7 | 42 | P8_0, P8_1, P8_2, P8_3, P8_4, P8_5, P8_6, P8_7, P8_8, P8_9, P8_10, P8_11, P8_12, P8_13, P8_14, P8_15, |
<> | 144:ef7eb2e8f9f7 | 43 | P9_0, P9_1, P9_2, P9_3, P9_4, P9_5, P9_6, P9_7, P9_8, P9_9, P9_10, P9_11, P9_12, P9_13, P9_14, P9_15, |
<> | 144:ef7eb2e8f9f7 | 44 | P10_0,P10_1,P10_2,P10_3,P10_4,P10_5,P10_6,P10_7,P10_8,P10_9,P10_10,P10_11,P10_12,P10_13,P10_14,P10_15, |
<> | 144:ef7eb2e8f9f7 | 45 | P11_0,P11_1,P11_2,P11_3,P11_4,P11_5,P11_6,P11_7,P11_8,P11_9,P11_10,P11_11,P11_12,P11_13,P11_14,P11_15, |
<> | 144:ef7eb2e8f9f7 | 46 | |
<> | 144:ef7eb2e8f9f7 | 47 | // mbed Pin Names |
<> | 144:ef7eb2e8f9f7 | 48 | LED1 = P6_13, |
<> | 144:ef7eb2e8f9f7 | 49 | LED2 = P6_14, |
<> | 144:ef7eb2e8f9f7 | 50 | LED3 = P6_15, |
<> | 144:ef7eb2e8f9f7 | 51 | LED4 = P6_12, |
<> | 144:ef7eb2e8f9f7 | 52 | |
<> | 144:ef7eb2e8f9f7 | 53 | LED_RED = LED1, |
<> | 144:ef7eb2e8f9f7 | 54 | LED_GREEN= LED2, |
<> | 144:ef7eb2e8f9f7 | 55 | LED_BLUE = LED3, |
<> | 144:ef7eb2e8f9f7 | 56 | LED_USER = LED4, |
<> | 144:ef7eb2e8f9f7 | 57 | |
<> | 144:ef7eb2e8f9f7 | 58 | USBTX = P6_3, |
<> | 144:ef7eb2e8f9f7 | 59 | USBRX = P6_2, |
<> | 144:ef7eb2e8f9f7 | 60 | |
<> | 144:ef7eb2e8f9f7 | 61 | // Arduiono Pin Names |
<> | 144:ef7eb2e8f9f7 | 62 | D0 = P2_15, |
<> | 144:ef7eb2e8f9f7 | 63 | D1 = P2_14, |
<> | 144:ef7eb2e8f9f7 | 64 | D2 = P4_7, |
<> | 144:ef7eb2e8f9f7 | 65 | D3 = P4_6, |
<> | 144:ef7eb2e8f9f7 | 66 | D4 = P4_5, |
<> | 144:ef7eb2e8f9f7 | 67 | D5 = P4_4, |
<> | 144:ef7eb2e8f9f7 | 68 | D6 = P8_13, |
<> | 144:ef7eb2e8f9f7 | 69 | D7 = P8_11, |
<> | 144:ef7eb2e8f9f7 | 70 | D8 = P8_15, |
<> | 144:ef7eb2e8f9f7 | 71 | D9 = P8_14, |
<> | 144:ef7eb2e8f9f7 | 72 | D10 = P10_13, |
<> | 144:ef7eb2e8f9f7 | 73 | D11 = P10_14, |
<> | 144:ef7eb2e8f9f7 | 74 | D12 = P10_15, |
<> | 144:ef7eb2e8f9f7 | 75 | D13 = P10_12, |
<> | 144:ef7eb2e8f9f7 | 76 | D14 = P1_3, |
<> | 144:ef7eb2e8f9f7 | 77 | D15 = P1_2, |
<> | 144:ef7eb2e8f9f7 | 78 | |
<> | 144:ef7eb2e8f9f7 | 79 | A0 = P1_8, |
<> | 144:ef7eb2e8f9f7 | 80 | A1 = P1_9, |
<> | 144:ef7eb2e8f9f7 | 81 | A2 = P1_10, |
<> | 144:ef7eb2e8f9f7 | 82 | A3 = P1_11, |
<> | 144:ef7eb2e8f9f7 | 83 | A4 = P1_13, |
<> | 144:ef7eb2e8f9f7 | 84 | A5 = P1_15, |
<> | 144:ef7eb2e8f9f7 | 85 | |
<> | 144:ef7eb2e8f9f7 | 86 | I2C_SCL = D15, |
<> | 144:ef7eb2e8f9f7 | 87 | I2C_SDA = D14, |
<> | 144:ef7eb2e8f9f7 | 88 | |
<> | 144:ef7eb2e8f9f7 | 89 | USER_BUTTON0 = P6_0, |
<> | 144:ef7eb2e8f9f7 | 90 | |
<> | 144:ef7eb2e8f9f7 | 91 | // Not connected |
<> | 144:ef7eb2e8f9f7 | 92 | NC = (int)0xFFFFFFFF |
<> | 144:ef7eb2e8f9f7 | 93 | } PinName; |
<> | 144:ef7eb2e8f9f7 | 94 | |
<> | 144:ef7eb2e8f9f7 | 95 | typedef enum { |
<> | 144:ef7eb2e8f9f7 | 96 | PullUp = 0, |
<> | 144:ef7eb2e8f9f7 | 97 | PullDown = 3, |
<> | 144:ef7eb2e8f9f7 | 98 | PullNone = 2, |
<> | 144:ef7eb2e8f9f7 | 99 | OpenDrain = 4, |
<> | 144:ef7eb2e8f9f7 | 100 | PullDefault = PullDown |
<> | 144:ef7eb2e8f9f7 | 101 | } PinMode; |
<> | 144:ef7eb2e8f9f7 | 102 | |
<> | 144:ef7eb2e8f9f7 | 103 | #define PINGROUP(pin) (((pin)>>PORT_SHIFT)&0x0f) |
<> | 144:ef7eb2e8f9f7 | 104 | #define PINNO(pin) ((pin)&0x0f) |
<> | 144:ef7eb2e8f9f7 | 105 | |
<> | 144:ef7eb2e8f9f7 | 106 | #ifdef __cplusplus |
<> | 144:ef7eb2e8f9f7 | 107 | } |
<> | 144:ef7eb2e8f9f7 | 108 | #endif |
<> | 144:ef7eb2e8f9f7 | 109 | |
<> | 144:ef7eb2e8f9f7 | 110 | #endif |