Mouse code for the MacroRat
mbed-dev/targets/TARGET_NXP/TARGET_LPC11UXX/TARGET_LPC11U34_421/PinNames.h@46:b156ef445742, 2017-06-03 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sat Jun 03 00:22:44 2017 +0000
- Revision:
- 46:b156ef445742
- Parent:
- 18:6a4db94011d3
Final code for internal battlebot competition.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | /* mbed Microcontroller Library |
sahilmgandhi | 18:6a4db94011d3 | 2 | * Copyright (c) 2006-2015 ARM Limited |
sahilmgandhi | 18:6a4db94011d3 | 3 | * |
sahilmgandhi | 18:6a4db94011d3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
sahilmgandhi | 18:6a4db94011d3 | 5 | * you may not use this file except in compliance with the License. |
sahilmgandhi | 18:6a4db94011d3 | 6 | * You may obtain a copy of the License at |
sahilmgandhi | 18:6a4db94011d3 | 7 | * |
sahilmgandhi | 18:6a4db94011d3 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
sahilmgandhi | 18:6a4db94011d3 | 9 | * |
sahilmgandhi | 18:6a4db94011d3 | 10 | * Unless required by applicable law or agreed to in writing, software |
sahilmgandhi | 18:6a4db94011d3 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
sahilmgandhi | 18:6a4db94011d3 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
sahilmgandhi | 18:6a4db94011d3 | 13 | * See the License for the specific language governing permissions and |
sahilmgandhi | 18:6a4db94011d3 | 14 | * limitations under the License. |
sahilmgandhi | 18:6a4db94011d3 | 15 | */ |
sahilmgandhi | 18:6a4db94011d3 | 16 | #ifndef MBED_PINNAMES_H |
sahilmgandhi | 18:6a4db94011d3 | 17 | #define MBED_PINNAMES_H |
sahilmgandhi | 18:6a4db94011d3 | 18 | |
sahilmgandhi | 18:6a4db94011d3 | 19 | #include "cmsis.h" |
sahilmgandhi | 18:6a4db94011d3 | 20 | |
sahilmgandhi | 18:6a4db94011d3 | 21 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 22 | extern "C" { |
sahilmgandhi | 18:6a4db94011d3 | 23 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 24 | |
sahilmgandhi | 18:6a4db94011d3 | 25 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 26 | PIN_INPUT, |
sahilmgandhi | 18:6a4db94011d3 | 27 | PIN_OUTPUT |
sahilmgandhi | 18:6a4db94011d3 | 28 | } PinDirection; |
sahilmgandhi | 18:6a4db94011d3 | 29 | |
sahilmgandhi | 18:6a4db94011d3 | 30 | #define PORT_SHIFT 5 |
sahilmgandhi | 18:6a4db94011d3 | 31 | |
sahilmgandhi | 18:6a4db94011d3 | 32 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 33 | // LPC11U Pin Names |
sahilmgandhi | 18:6a4db94011d3 | 34 | P0_0 = 0, |
sahilmgandhi | 18:6a4db94011d3 | 35 | P0_1 = 1, |
sahilmgandhi | 18:6a4db94011d3 | 36 | P0_2 = 2, |
sahilmgandhi | 18:6a4db94011d3 | 37 | P0_3 = 3, |
sahilmgandhi | 18:6a4db94011d3 | 38 | P0_4 = 4, |
sahilmgandhi | 18:6a4db94011d3 | 39 | P0_5 = 5, |
sahilmgandhi | 18:6a4db94011d3 | 40 | P0_6 = 6, |
sahilmgandhi | 18:6a4db94011d3 | 41 | P0_7 = 7, |
sahilmgandhi | 18:6a4db94011d3 | 42 | P0_8 = 8, |
sahilmgandhi | 18:6a4db94011d3 | 43 | P0_9 = 9, |
sahilmgandhi | 18:6a4db94011d3 | 44 | P0_10 = 10, |
sahilmgandhi | 18:6a4db94011d3 | 45 | P0_11 = 11, |
sahilmgandhi | 18:6a4db94011d3 | 46 | P0_12 = 12, |
sahilmgandhi | 18:6a4db94011d3 | 47 | P0_13 = 13, |
sahilmgandhi | 18:6a4db94011d3 | 48 | P0_14 = 14, |
sahilmgandhi | 18:6a4db94011d3 | 49 | P0_15 = 15, |
sahilmgandhi | 18:6a4db94011d3 | 50 | P0_16 = 16, |
sahilmgandhi | 18:6a4db94011d3 | 51 | P0_17 = 17, |
sahilmgandhi | 18:6a4db94011d3 | 52 | P0_18 = 18, |
sahilmgandhi | 18:6a4db94011d3 | 53 | P0_19 = 19, |
sahilmgandhi | 18:6a4db94011d3 | 54 | P0_20 = 20, |
sahilmgandhi | 18:6a4db94011d3 | 55 | P0_21 = 21, |
sahilmgandhi | 18:6a4db94011d3 | 56 | P0_22 = 22, |
sahilmgandhi | 18:6a4db94011d3 | 57 | P0_23 = 23, |
sahilmgandhi | 18:6a4db94011d3 | 58 | P0_24 = 24, |
sahilmgandhi | 18:6a4db94011d3 | 59 | P0_25 = 25, |
sahilmgandhi | 18:6a4db94011d3 | 60 | P0_26 = 26, |
sahilmgandhi | 18:6a4db94011d3 | 61 | P0_27 = 27, |
sahilmgandhi | 18:6a4db94011d3 | 62 | |
sahilmgandhi | 18:6a4db94011d3 | 63 | P1_0 = 32, |
sahilmgandhi | 18:6a4db94011d3 | 64 | P1_1 = 33, |
sahilmgandhi | 18:6a4db94011d3 | 65 | P1_2 = 34, |
sahilmgandhi | 18:6a4db94011d3 | 66 | P1_3 = 35, |
sahilmgandhi | 18:6a4db94011d3 | 67 | P1_4 = 36, |
sahilmgandhi | 18:6a4db94011d3 | 68 | P1_5 = 37, |
sahilmgandhi | 18:6a4db94011d3 | 69 | P1_6 = 38, |
sahilmgandhi | 18:6a4db94011d3 | 70 | P1_7 = 39, |
sahilmgandhi | 18:6a4db94011d3 | 71 | P1_8 = 40, |
sahilmgandhi | 18:6a4db94011d3 | 72 | P1_9 = 41, |
sahilmgandhi | 18:6a4db94011d3 | 73 | P1_10 = 42, |
sahilmgandhi | 18:6a4db94011d3 | 74 | P1_11 = 43, |
sahilmgandhi | 18:6a4db94011d3 | 75 | P1_12 = 44, |
sahilmgandhi | 18:6a4db94011d3 | 76 | P1_13 = 45, |
sahilmgandhi | 18:6a4db94011d3 | 77 | P1_14 = 46, |
sahilmgandhi | 18:6a4db94011d3 | 78 | P1_15 = 47, |
sahilmgandhi | 18:6a4db94011d3 | 79 | P1_16 = 48, |
sahilmgandhi | 18:6a4db94011d3 | 80 | P1_17 = 49, |
sahilmgandhi | 18:6a4db94011d3 | 81 | P1_18 = 50, |
sahilmgandhi | 18:6a4db94011d3 | 82 | P1_19 = 51, |
sahilmgandhi | 18:6a4db94011d3 | 83 | P1_20 = 52, |
sahilmgandhi | 18:6a4db94011d3 | 84 | P1_21 = 53, |
sahilmgandhi | 18:6a4db94011d3 | 85 | P1_22 = 54, |
sahilmgandhi | 18:6a4db94011d3 | 86 | P1_23 = 55, |
sahilmgandhi | 18:6a4db94011d3 | 87 | P1_24 = 56, |
sahilmgandhi | 18:6a4db94011d3 | 88 | P1_25 = 57, |
sahilmgandhi | 18:6a4db94011d3 | 89 | P1_26 = 58, |
sahilmgandhi | 18:6a4db94011d3 | 90 | P1_27 = 59, |
sahilmgandhi | 18:6a4db94011d3 | 91 | P1_28 = 60, |
sahilmgandhi | 18:6a4db94011d3 | 92 | P1_29 = 61, |
sahilmgandhi | 18:6a4db94011d3 | 93 | |
sahilmgandhi | 18:6a4db94011d3 | 94 | P1_31 = 63, |
sahilmgandhi | 18:6a4db94011d3 | 95 | |
sahilmgandhi | 18:6a4db94011d3 | 96 | // Other mbed Pin Names |
sahilmgandhi | 18:6a4db94011d3 | 97 | LED1 = P0_7, |
sahilmgandhi | 18:6a4db94011d3 | 98 | LED2 = P0_7, |
sahilmgandhi | 18:6a4db94011d3 | 99 | LED3 = P0_7, |
sahilmgandhi | 18:6a4db94011d3 | 100 | LED4 = P0_7, |
sahilmgandhi | 18:6a4db94011d3 | 101 | |
sahilmgandhi | 18:6a4db94011d3 | 102 | UART_TX = P0_19, |
sahilmgandhi | 18:6a4db94011d3 | 103 | UART_RX = P0_18, |
sahilmgandhi | 18:6a4db94011d3 | 104 | |
sahilmgandhi | 18:6a4db94011d3 | 105 | // Not connected |
sahilmgandhi | 18:6a4db94011d3 | 106 | NC = (int)0xFFFFFFFF, |
sahilmgandhi | 18:6a4db94011d3 | 107 | |
sahilmgandhi | 18:6a4db94011d3 | 108 | // Standard but not supported pins |
sahilmgandhi | 18:6a4db94011d3 | 109 | USBTX = NC, |
sahilmgandhi | 18:6a4db94011d3 | 110 | USBRX = NC, |
sahilmgandhi | 18:6a4db94011d3 | 111 | |
sahilmgandhi | 18:6a4db94011d3 | 112 | } PinName; |
sahilmgandhi | 18:6a4db94011d3 | 113 | |
sahilmgandhi | 18:6a4db94011d3 | 114 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 115 | CHANNEL0 = FLEX_INT0_IRQn, |
sahilmgandhi | 18:6a4db94011d3 | 116 | CHANNEL1 = FLEX_INT1_IRQn, |
sahilmgandhi | 18:6a4db94011d3 | 117 | CHANNEL2 = FLEX_INT2_IRQn, |
sahilmgandhi | 18:6a4db94011d3 | 118 | CHANNEL3 = FLEX_INT3_IRQn, |
sahilmgandhi | 18:6a4db94011d3 | 119 | CHANNEL4 = FLEX_INT4_IRQn, |
sahilmgandhi | 18:6a4db94011d3 | 120 | CHANNEL5 = FLEX_INT5_IRQn, |
sahilmgandhi | 18:6a4db94011d3 | 121 | CHANNEL6 = FLEX_INT6_IRQn, |
sahilmgandhi | 18:6a4db94011d3 | 122 | CHANNEL7 = FLEX_INT7_IRQn |
sahilmgandhi | 18:6a4db94011d3 | 123 | } Channel; |
sahilmgandhi | 18:6a4db94011d3 | 124 | |
sahilmgandhi | 18:6a4db94011d3 | 125 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 126 | PullUp = 2, |
sahilmgandhi | 18:6a4db94011d3 | 127 | PullDown = 1, |
sahilmgandhi | 18:6a4db94011d3 | 128 | PullNone = 0, |
sahilmgandhi | 18:6a4db94011d3 | 129 | Repeater = 3, |
sahilmgandhi | 18:6a4db94011d3 | 130 | OpenDrain = 4, |
sahilmgandhi | 18:6a4db94011d3 | 131 | PullDefault = PullDown |
sahilmgandhi | 18:6a4db94011d3 | 132 | } PinMode; |
sahilmgandhi | 18:6a4db94011d3 | 133 | |
sahilmgandhi | 18:6a4db94011d3 | 134 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 135 | } |
sahilmgandhi | 18:6a4db94011d3 | 136 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 137 | |
sahilmgandhi | 18:6a4db94011d3 | 138 | #endif |