Mouse code for the MacroRat
mbed-dev/targets/TARGET_ublox/TARGET_HI2110/TARGET_SARA_NBIOT/PinNames.h@18:6a4db94011d3, 2017-05-14 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sun May 14 23:18:57 2017 +0000
- Revision:
- 18:6a4db94011d3
Publishing again
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 | * SPDX-License-Identifier: Apache-2.0 |
sahilmgandhi | 18:6a4db94011d3 | 4 | * |
sahilmgandhi | 18:6a4db94011d3 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
sahilmgandhi | 18:6a4db94011d3 | 6 | * you may not use this file except in compliance with the License. |
sahilmgandhi | 18:6a4db94011d3 | 7 | * You may obtain a copy of the License at |
sahilmgandhi | 18:6a4db94011d3 | 8 | * |
sahilmgandhi | 18:6a4db94011d3 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
sahilmgandhi | 18:6a4db94011d3 | 10 | * |
sahilmgandhi | 18:6a4db94011d3 | 11 | * Unless required by applicable law or agreed to in writing, software |
sahilmgandhi | 18:6a4db94011d3 | 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
sahilmgandhi | 18:6a4db94011d3 | 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
sahilmgandhi | 18:6a4db94011d3 | 14 | * See the License for the specific language governing permissions and |
sahilmgandhi | 18:6a4db94011d3 | 15 | * limitations under the License. |
sahilmgandhi | 18:6a4db94011d3 | 16 | */ |
sahilmgandhi | 18:6a4db94011d3 | 17 | #ifndef MBED_PINNAMES_H |
sahilmgandhi | 18:6a4db94011d3 | 18 | #define MBED_PINNAMES_H |
sahilmgandhi | 18:6a4db94011d3 | 19 | |
sahilmgandhi | 18:6a4db94011d3 | 20 | #include "cmsis.h" |
sahilmgandhi | 18:6a4db94011d3 | 21 | |
sahilmgandhi | 18:6a4db94011d3 | 22 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 23 | extern "C" { |
sahilmgandhi | 18:6a4db94011d3 | 24 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 25 | |
sahilmgandhi | 18:6a4db94011d3 | 26 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 27 | PIN_INPUT, |
sahilmgandhi | 18:6a4db94011d3 | 28 | PIN_OUTPUT |
sahilmgandhi | 18:6a4db94011d3 | 29 | } PinDirection; |
sahilmgandhi | 18:6a4db94011d3 | 30 | |
sahilmgandhi | 18:6a4db94011d3 | 31 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 32 | p0 = 0, |
sahilmgandhi | 18:6a4db94011d3 | 33 | p1 = 1, |
sahilmgandhi | 18:6a4db94011d3 | 34 | p2 = 2, |
sahilmgandhi | 18:6a4db94011d3 | 35 | p3 = 3, |
sahilmgandhi | 18:6a4db94011d3 | 36 | p4 = 4, |
sahilmgandhi | 18:6a4db94011d3 | 37 | p5 = 5, |
sahilmgandhi | 18:6a4db94011d3 | 38 | p6 = 6, |
sahilmgandhi | 18:6a4db94011d3 | 39 | p7 = 7, |
sahilmgandhi | 18:6a4db94011d3 | 40 | p8 = 8, |
sahilmgandhi | 18:6a4db94011d3 | 41 | p9 = 9, |
sahilmgandhi | 18:6a4db94011d3 | 42 | p10 = 10, |
sahilmgandhi | 18:6a4db94011d3 | 43 | p11 = 11, |
sahilmgandhi | 18:6a4db94011d3 | 44 | p12 = 12, |
sahilmgandhi | 18:6a4db94011d3 | 45 | p13 = 13, |
sahilmgandhi | 18:6a4db94011d3 | 46 | p14 = 14, |
sahilmgandhi | 18:6a4db94011d3 | 47 | p15 = 15, |
sahilmgandhi | 18:6a4db94011d3 | 48 | p16 = 16, |
sahilmgandhi | 18:6a4db94011d3 | 49 | p17 = 17, |
sahilmgandhi | 18:6a4db94011d3 | 50 | p18 = 18, |
sahilmgandhi | 18:6a4db94011d3 | 51 | p19 = 19, |
sahilmgandhi | 18:6a4db94011d3 | 52 | |
sahilmgandhi | 18:6a4db94011d3 | 53 | UART0_RX = p13, |
sahilmgandhi | 18:6a4db94011d3 | 54 | UART0_TX = p18, |
sahilmgandhi | 18:6a4db94011d3 | 55 | UART0_CTS = p12, |
sahilmgandhi | 18:6a4db94011d3 | 56 | UART0_RTS = p11, |
sahilmgandhi | 18:6a4db94011d3 | 57 | I2C_SCL = p0, |
sahilmgandhi | 18:6a4db94011d3 | 58 | I2C_SDA = p1, |
sahilmgandhi | 18:6a4db94011d3 | 59 | SPI_CS = p2, |
sahilmgandhi | 18:6a4db94011d3 | 60 | SPI_CLK = p3, |
sahilmgandhi | 18:6a4db94011d3 | 61 | SPI_MOSI = p4, |
sahilmgandhi | 18:6a4db94011d3 | 62 | SPI_MISO = p5, |
sahilmgandhi | 18:6a4db94011d3 | 63 | UART1_RX = p7, |
sahilmgandhi | 18:6a4db94011d3 | 64 | UART1_TX = p6, |
sahilmgandhi | 18:6a4db94011d3 | 65 | LED1 = p2, |
sahilmgandhi | 18:6a4db94011d3 | 66 | LED2 = p3, |
sahilmgandhi | 18:6a4db94011d3 | 67 | LED3 = p4, |
sahilmgandhi | 18:6a4db94011d3 | 68 | LED4 = p5, |
sahilmgandhi | 18:6a4db94011d3 | 69 | |
sahilmgandhi | 18:6a4db94011d3 | 70 | // mBed interface Pins |
sahilmgandhi | 18:6a4db94011d3 | 71 | USBTX = UART0_TX, |
sahilmgandhi | 18:6a4db94011d3 | 72 | USBRX = UART0_RX, |
sahilmgandhi | 18:6a4db94011d3 | 73 | |
sahilmgandhi | 18:6a4db94011d3 | 74 | P0_0 = p0, |
sahilmgandhi | 18:6a4db94011d3 | 75 | P0_1 = p1, |
sahilmgandhi | 18:6a4db94011d3 | 76 | P0_2 = p2, |
sahilmgandhi | 18:6a4db94011d3 | 77 | P0_3 = p3, |
sahilmgandhi | 18:6a4db94011d3 | 78 | P0_4 = p4, |
sahilmgandhi | 18:6a4db94011d3 | 79 | P0_5 = p5, |
sahilmgandhi | 18:6a4db94011d3 | 80 | P0_6 = p6, |
sahilmgandhi | 18:6a4db94011d3 | 81 | P0_7 = p7, |
sahilmgandhi | 18:6a4db94011d3 | 82 | P0_8 = p8, |
sahilmgandhi | 18:6a4db94011d3 | 83 | P0_9 = p9, |
sahilmgandhi | 18:6a4db94011d3 | 84 | P0_10 = p10, |
sahilmgandhi | 18:6a4db94011d3 | 85 | P0_11 = p11, |
sahilmgandhi | 18:6a4db94011d3 | 86 | P0_12 = p12, |
sahilmgandhi | 18:6a4db94011d3 | 87 | P0_13 = p13, |
sahilmgandhi | 18:6a4db94011d3 | 88 | P0_14 = p14, |
sahilmgandhi | 18:6a4db94011d3 | 89 | P0_15 = p15, |
sahilmgandhi | 18:6a4db94011d3 | 90 | P0_16 = p16, |
sahilmgandhi | 18:6a4db94011d3 | 91 | P0_17 = p17, |
sahilmgandhi | 18:6a4db94011d3 | 92 | P0_18 = p18, |
sahilmgandhi | 18:6a4db94011d3 | 93 | P0_19 = p19, |
sahilmgandhi | 18:6a4db94011d3 | 94 | NUM_PINS, |
sahilmgandhi | 18:6a4db94011d3 | 95 | |
sahilmgandhi | 18:6a4db94011d3 | 96 | // Not connected |
sahilmgandhi | 18:6a4db94011d3 | 97 | NC = (int)0xFFFFFFFF |
sahilmgandhi | 18:6a4db94011d3 | 98 | } PinName; |
sahilmgandhi | 18:6a4db94011d3 | 99 | |
sahilmgandhi | 18:6a4db94011d3 | 100 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 101 | PullNone = 0, |
sahilmgandhi | 18:6a4db94011d3 | 102 | PullDown = 1, |
sahilmgandhi | 18:6a4db94011d3 | 103 | PullUp = 0xff, /* TODO: current HI2110 chip does not have pull-up */ |
sahilmgandhi | 18:6a4db94011d3 | 104 | PullDefault = PullDown /* TODO: mbed requires PullUp as default but HI2110 doesn't have it */ |
sahilmgandhi | 18:6a4db94011d3 | 105 | } PinMode; |
sahilmgandhi | 18:6a4db94011d3 | 106 | |
sahilmgandhi | 18:6a4db94011d3 | 107 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 108 | } |
sahilmgandhi | 18:6a4db94011d3 | 109 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 110 | |
sahilmgandhi | 18:6a4db94011d3 | 111 | #endif // MBED_PINNAMES_H |