test

Dependents:   robotic_fish_6

Committer:
juansal12
Date:
Fri Dec 03 23:00:34 2021 +0000
Revision:
0:c792b17d9f78
uploaded sofi code ;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
juansal12 0:c792b17d9f78 1 /* mbed Microcontroller Library
juansal12 0:c792b17d9f78 2 * Copyright (c) 2006-2013 ARM Limited
juansal12 0:c792b17d9f78 3 *
juansal12 0:c792b17d9f78 4 * Licensed under the Apache License, Version 2.0 (the "License");
juansal12 0:c792b17d9f78 5 * you may not use this file except in compliance with the License.
juansal12 0:c792b17d9f78 6 * You may obtain a copy of the License at
juansal12 0:c792b17d9f78 7 *
juansal12 0:c792b17d9f78 8 * http://www.apache.org/licenses/LICENSE-2.0
juansal12 0:c792b17d9f78 9 *
juansal12 0:c792b17d9f78 10 * Unless required by applicable law or agreed to in writing, software
juansal12 0:c792b17d9f78 11 * distributed under the License is distributed on an "AS IS" BASIS,
juansal12 0:c792b17d9f78 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
juansal12 0:c792b17d9f78 13 * See the License for the specific language governing permissions and
juansal12 0:c792b17d9f78 14 * limitations under the License.
juansal12 0:c792b17d9f78 15 */
juansal12 0:c792b17d9f78 16 #ifndef MBED_PERIPHERALNAMES_H
juansal12 0:c792b17d9f78 17 #define MBED_PERIPHERALNAMES_H
juansal12 0:c792b17d9f78 18
juansal12 0:c792b17d9f78 19 #include "cmsis.h"
juansal12 0:c792b17d9f78 20 #include "PinNames.h"
juansal12 0:c792b17d9f78 21
juansal12 0:c792b17d9f78 22 #ifdef __cplusplus
juansal12 0:c792b17d9f78 23 extern "C" {
juansal12 0:c792b17d9f78 24 #endif
juansal12 0:c792b17d9f78 25
juansal12 0:c792b17d9f78 26 typedef enum {
juansal12 0:c792b17d9f78 27 UART_0 = (int)LPC_UART0_BASE,
juansal12 0:c792b17d9f78 28 UART_1 = (int)LPC_UART1_BASE,
juansal12 0:c792b17d9f78 29 UART_2 = (int)LPC_UART2_BASE,
juansal12 0:c792b17d9f78 30 UART_3 = (int)LPC_UART3_BASE
juansal12 0:c792b17d9f78 31 } UARTName;
juansal12 0:c792b17d9f78 32
juansal12 0:c792b17d9f78 33 typedef enum {
juansal12 0:c792b17d9f78 34 ADC0_0 = 0,
juansal12 0:c792b17d9f78 35 ADC0_1,
juansal12 0:c792b17d9f78 36 ADC0_2,
juansal12 0:c792b17d9f78 37 ADC0_3,
juansal12 0:c792b17d9f78 38 ADC0_4,
juansal12 0:c792b17d9f78 39 ADC0_5,
juansal12 0:c792b17d9f78 40 ADC0_6,
juansal12 0:c792b17d9f78 41 ADC0_7
juansal12 0:c792b17d9f78 42 } ADCName;
juansal12 0:c792b17d9f78 43
juansal12 0:c792b17d9f78 44 typedef enum {
juansal12 0:c792b17d9f78 45 DAC_0 = 0
juansal12 0:c792b17d9f78 46 } DACName;
juansal12 0:c792b17d9f78 47
juansal12 0:c792b17d9f78 48 typedef enum {
juansal12 0:c792b17d9f78 49 SPI_0 = (int)LPC_SSP0_BASE,
juansal12 0:c792b17d9f78 50 SPI_1 = (int)LPC_SSP1_BASE
juansal12 0:c792b17d9f78 51 } SPIName;
juansal12 0:c792b17d9f78 52
juansal12 0:c792b17d9f78 53 typedef enum {
juansal12 0:c792b17d9f78 54 I2C_0 = (int)LPC_I2C0_BASE,
juansal12 0:c792b17d9f78 55 I2C_1 = (int)LPC_I2C1_BASE,
juansal12 0:c792b17d9f78 56 I2C_2 = (int)LPC_I2C2_BASE
juansal12 0:c792b17d9f78 57 } I2CName;
juansal12 0:c792b17d9f78 58
juansal12 0:c792b17d9f78 59 typedef enum {
juansal12 0:c792b17d9f78 60 PWM_1 = 1,
juansal12 0:c792b17d9f78 61 PWM_2,
juansal12 0:c792b17d9f78 62 PWM_3,
juansal12 0:c792b17d9f78 63 PWM_4,
juansal12 0:c792b17d9f78 64 PWM_5,
juansal12 0:c792b17d9f78 65 PWM_6
juansal12 0:c792b17d9f78 66 } PWMName;
juansal12 0:c792b17d9f78 67
juansal12 0:c792b17d9f78 68 typedef enum {
juansal12 0:c792b17d9f78 69 CAN_1 = (int)LPC_CAN1_BASE,
juansal12 0:c792b17d9f78 70 CAN_2 = (int)LPC_CAN2_BASE
juansal12 0:c792b17d9f78 71 } CANName;
juansal12 0:c792b17d9f78 72
juansal12 0:c792b17d9f78 73 #define STDIO_UART_TX USBTX
juansal12 0:c792b17d9f78 74 #define STDIO_UART_RX USBRX
juansal12 0:c792b17d9f78 75 #define STDIO_UART UART_0
juansal12 0:c792b17d9f78 76
juansal12 0:c792b17d9f78 77 // Default peripherals
juansal12 0:c792b17d9f78 78 #define MBED_SPI0 p5, p6, p7, p8
juansal12 0:c792b17d9f78 79 #define MBED_SPI1 p11, p12, p13, p14
juansal12 0:c792b17d9f78 80
juansal12 0:c792b17d9f78 81 #define MBED_UART0 p9, p10
juansal12 0:c792b17d9f78 82 #define MBED_UART1 p13, p14
juansal12 0:c792b17d9f78 83 #define MBED_UART2 p28, p27
juansal12 0:c792b17d9f78 84 #define MBED_UARTUSB USBTX, USBRX
juansal12 0:c792b17d9f78 85
juansal12 0:c792b17d9f78 86 #define MBED_I2C0 p28, p27
juansal12 0:c792b17d9f78 87 #define MBED_I2C1 p9, p10
juansal12 0:c792b17d9f78 88
juansal12 0:c792b17d9f78 89 #define MBED_CAN0 p30, p29
juansal12 0:c792b17d9f78 90
juansal12 0:c792b17d9f78 91 #define MBED_ANALOGOUT0 p18
juansal12 0:c792b17d9f78 92
juansal12 0:c792b17d9f78 93 #define MBED_ANALOGIN0 p15
juansal12 0:c792b17d9f78 94 #define MBED_ANALOGIN1 p16
juansal12 0:c792b17d9f78 95 #define MBED_ANALOGIN2 p17
juansal12 0:c792b17d9f78 96 #define MBED_ANALOGIN3 p18
juansal12 0:c792b17d9f78 97 #define MBED_ANALOGIN4 p19
juansal12 0:c792b17d9f78 98 #define MBED_ANALOGIN5 p20
juansal12 0:c792b17d9f78 99
juansal12 0:c792b17d9f78 100 #define MBED_PWMOUT0 p26
juansal12 0:c792b17d9f78 101 #define MBED_PWMOUT1 p25
juansal12 0:c792b17d9f78 102 #define MBED_PWMOUT2 p24
juansal12 0:c792b17d9f78 103 #define MBED_PWMOUT3 p23
juansal12 0:c792b17d9f78 104 #define MBED_PWMOUT4 p22
juansal12 0:c792b17d9f78 105 #define MBED_PWMOUT5 p21
juansal12 0:c792b17d9f78 106
juansal12 0:c792b17d9f78 107 #ifdef __cplusplus
juansal12 0:c792b17d9f78 108 }
juansal12 0:c792b17d9f78 109 #endif
juansal12 0:c792b17d9f78 110
juansal12 0:c792b17d9f78 111 #endif