code for read VL53l0x sensor with CAN

Dependencies:   mbed

Committer:
pablo_bmxrp
Date:
Mon Mar 18 22:45:39 2019 +0000
Revision:
1:7bbfe329c62b
Parent:
STM32F103C8T6_MPA/mbed-STM32F103C8T6/PinNames.h@0:44429c0a71d4
V1.0

Who changed what in which revision?

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