Public fork of mbed-src to add generic stm32f030k6 target
Fork of mbed-src by
targets/hal/TARGET_Atmel/TARGET_SAM21/PeripheralNames.h@579:53297373a894, 2015-07-01 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Jul 01 09:45:11 2015 +0100
- Revision:
- 579:53297373a894
- Child:
- 592:a274ee790e56
Synchronized with git revision d5b4d2ab9c47edb4dc5776e7177b0c2263459081
Full URL: https://github.com/mbedmicro/mbed/commit/d5b4d2ab9c47edb4dc5776e7177b0c2263459081/
Initial version of drivers for SAMR21
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 579:53297373a894 | 1 | /* mbed Microcontroller Library |
mbed_official | 579:53297373a894 | 2 | * Copyright (c) 2006-2013 ARM Limited |
mbed_official | 579:53297373a894 | 3 | * |
mbed_official | 579:53297373a894 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mbed_official | 579:53297373a894 | 5 | * you may not use this file except in compliance with the License. |
mbed_official | 579:53297373a894 | 6 | * You may obtain a copy of the License at |
mbed_official | 579:53297373a894 | 7 | * |
mbed_official | 579:53297373a894 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 579:53297373a894 | 9 | * |
mbed_official | 579:53297373a894 | 10 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 579:53297373a894 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 579:53297373a894 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 579:53297373a894 | 13 | * See the License for the specific language governing permissions and |
mbed_official | 579:53297373a894 | 14 | * limitations under the License. |
mbed_official | 579:53297373a894 | 15 | */ |
mbed_official | 579:53297373a894 | 16 | #ifndef MBED_PERIPHERALNAMES_H |
mbed_official | 579:53297373a894 | 17 | #define MBED_PERIPHERALNAMES_H |
mbed_official | 579:53297373a894 | 18 | |
mbed_official | 579:53297373a894 | 19 | #include <compiler.h> |
mbed_official | 579:53297373a894 | 20 | #include "cmsis.h" |
mbed_official | 579:53297373a894 | 21 | #include "PinNames.h" |
mbed_official | 579:53297373a894 | 22 | |
mbed_official | 579:53297373a894 | 23 | #ifdef __cplusplus |
mbed_official | 579:53297373a894 | 24 | extern "C" { |
mbed_official | 579:53297373a894 | 25 | #endif |
mbed_official | 579:53297373a894 | 26 | |
mbed_official | 579:53297373a894 | 27 | #define _SERCOM_SPI_NAME(n, unused) \ |
mbed_official | 579:53297373a894 | 28 | SPI##n, |
mbed_official | 579:53297373a894 | 29 | |
mbed_official | 579:53297373a894 | 30 | #define _SERCOM_I2C_NAME(n, unused) \ |
mbed_official | 579:53297373a894 | 31 | I2C##n, |
mbed_official | 579:53297373a894 | 32 | |
mbed_official | 579:53297373a894 | 33 | |
mbed_official | 579:53297373a894 | 34 | |
mbed_official | 579:53297373a894 | 35 | typedef enum { |
mbed_official | 579:53297373a894 | 36 | UART_0 = (int)0x42000800UL, // Base address of SERCOM0 |
mbed_official | 579:53297373a894 | 37 | UART_1 = (int)0x42000C00UL, // Base address of SERCOM1 |
mbed_official | 579:53297373a894 | 38 | UART_2 = (int)0x42001000UL, // Base address of SERCOM2 |
mbed_official | 579:53297373a894 | 39 | UART_3 = (int)0x42001400UL, // Base address of SERCOM3 |
mbed_official | 579:53297373a894 | 40 | UART_4 = (int)0x42001800UL, // Base address of SERCOM4 |
mbed_official | 579:53297373a894 | 41 | UART_5 = (int)0x42001C00UL // Base address of SERCOM5 |
mbed_official | 579:53297373a894 | 42 | } UARTName; |
mbed_official | 579:53297373a894 | 43 | /* |
mbed_official | 579:53297373a894 | 44 | typedef enum { |
mbed_official | 579:53297373a894 | 45 | ADC0_0 = 0, |
mbed_official | 579:53297373a894 | 46 | ADC0_1, |
mbed_official | 579:53297373a894 | 47 | ADC0_2, |
mbed_official | 579:53297373a894 | 48 | ADC0_3, |
mbed_official | 579:53297373a894 | 49 | ADC0_4, |
mbed_official | 579:53297373a894 | 50 | ADC0_5, |
mbed_official | 579:53297373a894 | 51 | ADC0_6, |
mbed_official | 579:53297373a894 | 52 | ADC0_7 |
mbed_official | 579:53297373a894 | 53 | } ADCName; |
mbed_official | 579:53297373a894 | 54 | |
mbed_official | 579:53297373a894 | 55 | typedef enum { |
mbed_official | 579:53297373a894 | 56 | DAC_0 = 0 |
mbed_official | 579:53297373a894 | 57 | } DACName;*/ |
mbed_official | 579:53297373a894 | 58 | |
mbed_official | 579:53297373a894 | 59 | typedef enum { |
mbed_official | 579:53297373a894 | 60 | MREPEAT(SERCOM_INST_NUM, _SERCOM_SPI_NAME, ~) |
mbed_official | 579:53297373a894 | 61 | } SPIName; |
mbed_official | 579:53297373a894 | 62 | |
mbed_official | 579:53297373a894 | 63 | typedef enum { |
mbed_official | 579:53297373a894 | 64 | MREPEAT(SERCOM_INST_NUM, _SERCOM_I2C_NAME, ~) |
mbed_official | 579:53297373a894 | 65 | } I2CName; |
mbed_official | 579:53297373a894 | 66 | /* |
mbed_official | 579:53297373a894 | 67 | typedef enum { |
mbed_official | 579:53297373a894 | 68 | PWM_1 = 1, |
mbed_official | 579:53297373a894 | 69 | PWM_2, |
mbed_official | 579:53297373a894 | 70 | PWM_3, |
mbed_official | 579:53297373a894 | 71 | PWM_4, |
mbed_official | 579:53297373a894 | 72 | PWM_5, |
mbed_official | 579:53297373a894 | 73 | PWM_6 |
mbed_official | 579:53297373a894 | 74 | } PWMName; |
mbed_official | 579:53297373a894 | 75 | |
mbed_official | 579:53297373a894 | 76 | typedef enum { |
mbed_official | 579:53297373a894 | 77 | CAN_1 = (int)LPC_CAN1_BASE, |
mbed_official | 579:53297373a894 | 78 | CAN_2 = (int)LPC_CAN2_BASE |
mbed_official | 579:53297373a894 | 79 | } CANName;*/ |
mbed_official | 579:53297373a894 | 80 | |
mbed_official | 579:53297373a894 | 81 | #define STDIO_UART_TX USBTX |
mbed_official | 579:53297373a894 | 82 | #define STDIO_UART_RX USBRX |
mbed_official | 579:53297373a894 | 83 | #define STDIO_UART UART_0 |
mbed_official | 579:53297373a894 | 84 | |
mbed_official | 579:53297373a894 | 85 | // Default peripherals |
mbed_official | 579:53297373a894 | 86 | #define MBED_SPI0 p5, p6, p7, p8 |
mbed_official | 579:53297373a894 | 87 | #define MBED_SPI1 p11, p12, p13, p14 |
mbed_official | 579:53297373a894 | 88 | |
mbed_official | 579:53297373a894 | 89 | #define MBED_UART0 p9, p10 |
mbed_official | 579:53297373a894 | 90 | #define MBED_UART1 p13, p14 |
mbed_official | 579:53297373a894 | 91 | #define MBED_UART2 p28, p27 |
mbed_official | 579:53297373a894 | 92 | #define MBED_UARTUSB USBTX, USBRX |
mbed_official | 579:53297373a894 | 93 | |
mbed_official | 579:53297373a894 | 94 | #define MBED_I2C0 p28, p27 |
mbed_official | 579:53297373a894 | 95 | #define MBED_I2C1 p9, p10 |
mbed_official | 579:53297373a894 | 96 | |
mbed_official | 579:53297373a894 | 97 | #define MBED_CAN0 p30, p29 |
mbed_official | 579:53297373a894 | 98 | |
mbed_official | 579:53297373a894 | 99 | #define MBED_ANALOGOUT0 p18 |
mbed_official | 579:53297373a894 | 100 | |
mbed_official | 579:53297373a894 | 101 | #define MBED_ANALOGIN0 p15 |
mbed_official | 579:53297373a894 | 102 | #define MBED_ANALOGIN1 p16 |
mbed_official | 579:53297373a894 | 103 | #define MBED_ANALOGIN2 p17 |
mbed_official | 579:53297373a894 | 104 | #define MBED_ANALOGIN3 p18 |
mbed_official | 579:53297373a894 | 105 | #define MBED_ANALOGIN4 p19 |
mbed_official | 579:53297373a894 | 106 | #define MBED_ANALOGIN5 p20 |
mbed_official | 579:53297373a894 | 107 | |
mbed_official | 579:53297373a894 | 108 | #define MBED_PWMOUT0 p26 |
mbed_official | 579:53297373a894 | 109 | #define MBED_PWMOUT1 p25 |
mbed_official | 579:53297373a894 | 110 | #define MBED_PWMOUT2 p24 |
mbed_official | 579:53297373a894 | 111 | #define MBED_PWMOUT3 p23 |
mbed_official | 579:53297373a894 | 112 | #define MBED_PWMOUT4 p22 |
mbed_official | 579:53297373a894 | 113 | #define MBED_PWMOUT5 p21 |
mbed_official | 579:53297373a894 | 114 | |
mbed_official | 579:53297373a894 | 115 | #ifdef __cplusplus |
mbed_official | 579:53297373a894 | 116 | } |
mbed_official | 579:53297373a894 | 117 | #endif |
mbed_official | 579:53297373a894 | 118 | |
mbed_official | 579:53297373a894 | 119 | #endif |