Mouse code for the MacroRat
mbed-dev/targets/TARGET_STM/TARGET_STM32L0/TARGET_DISCO_L053C8/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 | ******************************************************************************* |
sahilmgandhi | 18:6a4db94011d3 | 3 | * Copyright (c) 2015, STMicroelectronics |
sahilmgandhi | 18:6a4db94011d3 | 4 | * All rights reserved. |
sahilmgandhi | 18:6a4db94011d3 | 5 | * |
sahilmgandhi | 18:6a4db94011d3 | 6 | * Redistribution and use in source and binary forms, with or without |
sahilmgandhi | 18:6a4db94011d3 | 7 | * modification, are permitted provided that the following conditions are met: |
sahilmgandhi | 18:6a4db94011d3 | 8 | * |
sahilmgandhi | 18:6a4db94011d3 | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
sahilmgandhi | 18:6a4db94011d3 | 10 | * this list of conditions and the following disclaimer. |
sahilmgandhi | 18:6a4db94011d3 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
sahilmgandhi | 18:6a4db94011d3 | 12 | * this list of conditions and the following disclaimer in the documentation |
sahilmgandhi | 18:6a4db94011d3 | 13 | * and/or other materials provided with the distribution. |
sahilmgandhi | 18:6a4db94011d3 | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
sahilmgandhi | 18:6a4db94011d3 | 15 | * may be used to endorse or promote products derived from this software |
sahilmgandhi | 18:6a4db94011d3 | 16 | * without specific prior written permission. |
sahilmgandhi | 18:6a4db94011d3 | 17 | * |
sahilmgandhi | 18:6a4db94011d3 | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
sahilmgandhi | 18:6a4db94011d3 | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
sahilmgandhi | 18:6a4db94011d3 | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
sahilmgandhi | 18:6a4db94011d3 | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
sahilmgandhi | 18:6a4db94011d3 | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
sahilmgandhi | 18:6a4db94011d3 | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
sahilmgandhi | 18:6a4db94011d3 | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
sahilmgandhi | 18:6a4db94011d3 | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
sahilmgandhi | 18:6a4db94011d3 | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
sahilmgandhi | 18:6a4db94011d3 | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
sahilmgandhi | 18:6a4db94011d3 | 28 | ******************************************************************************* |
sahilmgandhi | 18:6a4db94011d3 | 29 | */ |
sahilmgandhi | 18:6a4db94011d3 | 30 | #ifndef MBED_PINNAMES_H |
sahilmgandhi | 18:6a4db94011d3 | 31 | #define MBED_PINNAMES_H |
sahilmgandhi | 18:6a4db94011d3 | 32 | |
sahilmgandhi | 18:6a4db94011d3 | 33 | #include "cmsis.h" |
sahilmgandhi | 18:6a4db94011d3 | 34 | #include "PinNamesTypes.h" |
sahilmgandhi | 18:6a4db94011d3 | 35 | |
sahilmgandhi | 18:6a4db94011d3 | 36 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 37 | extern "C" { |
sahilmgandhi | 18:6a4db94011d3 | 38 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 39 | |
sahilmgandhi | 18:6a4db94011d3 | 40 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 41 | PA_0 = 0x00, |
sahilmgandhi | 18:6a4db94011d3 | 42 | PA_1 = 0x01, |
sahilmgandhi | 18:6a4db94011d3 | 43 | PA_2 = 0x02, |
sahilmgandhi | 18:6a4db94011d3 | 44 | PA_3 = 0x03, |
sahilmgandhi | 18:6a4db94011d3 | 45 | PA_4 = 0x04, |
sahilmgandhi | 18:6a4db94011d3 | 46 | PA_5 = 0x05, |
sahilmgandhi | 18:6a4db94011d3 | 47 | PA_6 = 0x06, |
sahilmgandhi | 18:6a4db94011d3 | 48 | PA_7 = 0x07, |
sahilmgandhi | 18:6a4db94011d3 | 49 | PA_8 = 0x08, |
sahilmgandhi | 18:6a4db94011d3 | 50 | PA_9 = 0x09, |
sahilmgandhi | 18:6a4db94011d3 | 51 | PA_10 = 0x0A, |
sahilmgandhi | 18:6a4db94011d3 | 52 | PA_11 = 0x0B, |
sahilmgandhi | 18:6a4db94011d3 | 53 | PA_12 = 0x0C, |
sahilmgandhi | 18:6a4db94011d3 | 54 | PA_13 = 0x0D, |
sahilmgandhi | 18:6a4db94011d3 | 55 | PA_14 = 0x0E, |
sahilmgandhi | 18:6a4db94011d3 | 56 | PA_15 = 0x0F, |
sahilmgandhi | 18:6a4db94011d3 | 57 | |
sahilmgandhi | 18:6a4db94011d3 | 58 | PB_0 = 0x10, |
sahilmgandhi | 18:6a4db94011d3 | 59 | PB_1 = 0x11, |
sahilmgandhi | 18:6a4db94011d3 | 60 | PB_2 = 0x12, |
sahilmgandhi | 18:6a4db94011d3 | 61 | PB_3 = 0x13, |
sahilmgandhi | 18:6a4db94011d3 | 62 | PB_4 = 0x14, |
sahilmgandhi | 18:6a4db94011d3 | 63 | PB_5 = 0x15, |
sahilmgandhi | 18:6a4db94011d3 | 64 | PB_6 = 0x16, |
sahilmgandhi | 18:6a4db94011d3 | 65 | PB_7 = 0x17, |
sahilmgandhi | 18:6a4db94011d3 | 66 | PB_8 = 0x18, |
sahilmgandhi | 18:6a4db94011d3 | 67 | PB_9 = 0x19, |
sahilmgandhi | 18:6a4db94011d3 | 68 | PB_10 = 0x1A, |
sahilmgandhi | 18:6a4db94011d3 | 69 | PB_11 = 0x1B, |
sahilmgandhi | 18:6a4db94011d3 | 70 | PB_12 = 0x1C, |
sahilmgandhi | 18:6a4db94011d3 | 71 | PB_13 = 0x1D, |
sahilmgandhi | 18:6a4db94011d3 | 72 | PB_14 = 0x1E, |
sahilmgandhi | 18:6a4db94011d3 | 73 | PB_15 = 0x1F, |
sahilmgandhi | 18:6a4db94011d3 | 74 | |
sahilmgandhi | 18:6a4db94011d3 | 75 | PC_13 = 0x2D, |
sahilmgandhi | 18:6a4db94011d3 | 76 | PC_14 = 0x2E, |
sahilmgandhi | 18:6a4db94011d3 | 77 | PC_15 = 0x2F, |
sahilmgandhi | 18:6a4db94011d3 | 78 | |
sahilmgandhi | 18:6a4db94011d3 | 79 | PH_0 = 0x70, |
sahilmgandhi | 18:6a4db94011d3 | 80 | PH_1 = 0x71, |
sahilmgandhi | 18:6a4db94011d3 | 81 | |
sahilmgandhi | 18:6a4db94011d3 | 82 | // ADC internal channels |
sahilmgandhi | 18:6a4db94011d3 | 83 | ADC_TEMP = 0xF0, |
sahilmgandhi | 18:6a4db94011d3 | 84 | ADC_VREF = 0xF1, |
sahilmgandhi | 18:6a4db94011d3 | 85 | ADC_VLCD = 0xF2, |
sahilmgandhi | 18:6a4db94011d3 | 86 | |
sahilmgandhi | 18:6a4db94011d3 | 87 | // Arduino connector namings |
sahilmgandhi | 18:6a4db94011d3 | 88 | // Note: The Arduino connector is not present on this board. |
sahilmgandhi | 18:6a4db94011d3 | 89 | // We keep these definitions for compatibility with Nucleo code examples. |
sahilmgandhi | 18:6a4db94011d3 | 90 | A0 = PA_1, |
sahilmgandhi | 18:6a4db94011d3 | 91 | A1 = PA_2, |
sahilmgandhi | 18:6a4db94011d3 | 92 | A2 = PA_3, |
sahilmgandhi | 18:6a4db94011d3 | 93 | A3 = PA_4, |
sahilmgandhi | 18:6a4db94011d3 | 94 | A4 = PB_0, |
sahilmgandhi | 18:6a4db94011d3 | 95 | A5 = PB_1, |
sahilmgandhi | 18:6a4db94011d3 | 96 | D0 = PA_10, |
sahilmgandhi | 18:6a4db94011d3 | 97 | D1 = PA_9, |
sahilmgandhi | 18:6a4db94011d3 | 98 | D2 = PA_8, |
sahilmgandhi | 18:6a4db94011d3 | 99 | D3 = PA_6, |
sahilmgandhi | 18:6a4db94011d3 | 100 | D4 = PA_13, |
sahilmgandhi | 18:6a4db94011d3 | 101 | D5 = PA_7, |
sahilmgandhi | 18:6a4db94011d3 | 102 | D6 = PB_11, |
sahilmgandhi | 18:6a4db94011d3 | 103 | D7 = PC_13, |
sahilmgandhi | 18:6a4db94011d3 | 104 | D8 = PC_14, |
sahilmgandhi | 18:6a4db94011d3 | 105 | D9 = PA_15, |
sahilmgandhi | 18:6a4db94011d3 | 106 | D10 = PA_5, |
sahilmgandhi | 18:6a4db94011d3 | 107 | D11 = PB_15, |
sahilmgandhi | 18:6a4db94011d3 | 108 | D12 = PB_14, |
sahilmgandhi | 18:6a4db94011d3 | 109 | D13 = PB_13, |
sahilmgandhi | 18:6a4db94011d3 | 110 | D14 = PB_9, |
sahilmgandhi | 18:6a4db94011d3 | 111 | D15 = PB_8, |
sahilmgandhi | 18:6a4db94011d3 | 112 | |
sahilmgandhi | 18:6a4db94011d3 | 113 | // Generic signals namings |
sahilmgandhi | 18:6a4db94011d3 | 114 | LED1 = PB_4, |
sahilmgandhi | 18:6a4db94011d3 | 115 | LED2 = PA_5, |
sahilmgandhi | 18:6a4db94011d3 | 116 | LED3 = PB_4, |
sahilmgandhi | 18:6a4db94011d3 | 117 | LED4 = PA_5, |
sahilmgandhi | 18:6a4db94011d3 | 118 | USER_BUTTON = PA_0, |
sahilmgandhi | 18:6a4db94011d3 | 119 | // Standardized button names |
sahilmgandhi | 18:6a4db94011d3 | 120 | BUTTON1 = USER_BUTTON, |
sahilmgandhi | 18:6a4db94011d3 | 121 | SERIAL_TX = PA_9, |
sahilmgandhi | 18:6a4db94011d3 | 122 | SERIAL_RX = PA_10, |
sahilmgandhi | 18:6a4db94011d3 | 123 | USBTX = PA_9, |
sahilmgandhi | 18:6a4db94011d3 | 124 | USBRX = PA_10, |
sahilmgandhi | 18:6a4db94011d3 | 125 | I2C_SCL = PB_8, |
sahilmgandhi | 18:6a4db94011d3 | 126 | I2C_SDA = PB_9, |
sahilmgandhi | 18:6a4db94011d3 | 127 | SPI_MOSI = PB_15, |
sahilmgandhi | 18:6a4db94011d3 | 128 | SPI_MISO = PB_14, |
sahilmgandhi | 18:6a4db94011d3 | 129 | SPI_SCK = PB_13, |
sahilmgandhi | 18:6a4db94011d3 | 130 | SPI_CS = PB_12, |
sahilmgandhi | 18:6a4db94011d3 | 131 | PWM_OUT = PB_11, |
sahilmgandhi | 18:6a4db94011d3 | 132 | |
sahilmgandhi | 18:6a4db94011d3 | 133 | // Not connected |
sahilmgandhi | 18:6a4db94011d3 | 134 | NC = (int)0xFFFFFFFF |
sahilmgandhi | 18:6a4db94011d3 | 135 | } PinName; |
sahilmgandhi | 18:6a4db94011d3 | 136 | |
sahilmgandhi | 18:6a4db94011d3 | 137 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 138 | } |
sahilmgandhi | 18:6a4db94011d3 | 139 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 140 | |
sahilmgandhi | 18:6a4db94011d3 | 141 | #endif |