mbed library sources
Dependents: Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more
Superseded
This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.
Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.
If you are looking for a stable and tested release, please import one of the official mbed library releases:
Import librarymbed
The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32GG_STK3700/PinNames.h@593:78ee8643776a, 2015-07-20 (annotated)
- Committer:
- mbed_official
- Date:
- Mon Jul 20 09:00:09 2015 +0100
- Revision:
- 593:78ee8643776a
- Parent:
- 525:c320967f86b9
- Child:
- 627:4fa1328d9c60
Synchronized with git revision a68b724d07788e6389ea4d52c622aad767953758
Full URL: https://github.com/mbedmicro/mbed/commit/a68b724d07788e6389ea4d52c622aad767953758/
[Silicon Labs] Bring EFM32 HAL up to date
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 525:c320967f86b9 | 1 | /* mbed Microcontroller Library |
mbed_official | 525:c320967f86b9 | 2 | * Copyright (c) 2006-2013 ARM Limited |
mbed_official | 525:c320967f86b9 | 3 | * |
mbed_official | 525:c320967f86b9 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mbed_official | 525:c320967f86b9 | 5 | * you may not use this file except in compliance with the License. |
mbed_official | 525:c320967f86b9 | 6 | * You may obtain a copy of the License at |
mbed_official | 525:c320967f86b9 | 7 | * |
mbed_official | 525:c320967f86b9 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 525:c320967f86b9 | 9 | * |
mbed_official | 525:c320967f86b9 | 10 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 525:c320967f86b9 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 525:c320967f86b9 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 525:c320967f86b9 | 13 | * See the License for the specific language governing permissions and |
mbed_official | 525:c320967f86b9 | 14 | * limitations under the License. |
mbed_official | 525:c320967f86b9 | 15 | */ |
mbed_official | 525:c320967f86b9 | 16 | #ifndef MBED_PINNAMES_H |
mbed_official | 525:c320967f86b9 | 17 | #define MBED_PINNAMES_H |
mbed_official | 525:c320967f86b9 | 18 | |
mbed_official | 525:c320967f86b9 | 19 | #include "cmsis.h" |
mbed_official | 525:c320967f86b9 | 20 | #include "em_gpio.h" |
mbed_official | 525:c320967f86b9 | 21 | #include "Modules.h" |
mbed_official | 525:c320967f86b9 | 22 | |
mbed_official | 525:c320967f86b9 | 23 | #ifdef __cplusplus |
mbed_official | 525:c320967f86b9 | 24 | extern "C" { |
mbed_official | 525:c320967f86b9 | 25 | #endif |
mbed_official | 525:c320967f86b9 | 26 | |
mbed_official | 525:c320967f86b9 | 27 | typedef enum { |
mbed_official | 525:c320967f86b9 | 28 | PIN_INPUT = 0, |
mbed_official | 525:c320967f86b9 | 29 | PIN_OUTPUT = 1 |
mbed_official | 525:c320967f86b9 | 30 | } PinDirection; |
mbed_official | 525:c320967f86b9 | 31 | |
mbed_official | 525:c320967f86b9 | 32 | typedef enum { |
mbed_official | 525:c320967f86b9 | 33 | /* EFM32 Pin Names |
mbed_official | 525:c320967f86b9 | 34 | * First 4 bits represent pin number, the remaining |
mbed_official | 525:c320967f86b9 | 35 | * bits represent port number (A = 0, B = 1, ...) |
mbed_official | 525:c320967f86b9 | 36 | */ |
mbed_official | 525:c320967f86b9 | 37 | PA0 = 0 << 4, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, |
mbed_official | 525:c320967f86b9 | 38 | PB0 = 1 << 4, PB1, PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, |
mbed_official | 525:c320967f86b9 | 39 | PC0 = 2 << 4, PC1, PC2, PC3, PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, |
mbed_official | 525:c320967f86b9 | 40 | PD0 = 3 << 4, PD1, PD2, PD3, PD4, PD5, PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, |
mbed_official | 525:c320967f86b9 | 41 | PE0 = 4 << 4, PE1, PE2, PE3, PE4, PE5, PE6, PE7, PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, |
mbed_official | 525:c320967f86b9 | 42 | PF0 = 5 << 4, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, PF10, PF11, PF12, PF13, PF14, PF15, |
mbed_official | 525:c320967f86b9 | 43 | |
mbed_official | 525:c320967f86b9 | 44 | /* Starter Kit says LED0 and LED1, but mbed expects 1 and 2. This way using 1 and 2 or 0 and 1 will work. */ |
mbed_official | 525:c320967f86b9 | 45 | LED0 = PE2, |
mbed_official | 525:c320967f86b9 | 46 | LED1 = PE3, |
mbed_official | 525:c320967f86b9 | 47 | LED2 = LED0, |
mbed_official | 525:c320967f86b9 | 48 | LED3 = LED0, |
mbed_official | 525:c320967f86b9 | 49 | LED4 = LED1, |
mbed_official | 525:c320967f86b9 | 50 | |
mbed_official | 525:c320967f86b9 | 51 | /* Push Buttons */ |
mbed_official | 525:c320967f86b9 | 52 | SW0 = PB9, |
mbed_official | 525:c320967f86b9 | 53 | SW1 = PB10, |
mbed_official | 525:c320967f86b9 | 54 | BTN0 = SW0, |
mbed_official | 525:c320967f86b9 | 55 | BTN1 = SW1, |
mbed_official | 525:c320967f86b9 | 56 | |
mbed_official | 525:c320967f86b9 | 57 | /* Serial */ |
mbed_official | 525:c320967f86b9 | 58 | SERIAL_TX = PD0, |
mbed_official | 525:c320967f86b9 | 59 | SERIAL_RX = PD1, |
mbed_official | 525:c320967f86b9 | 60 | USBTX = PE0, |
mbed_official | 525:c320967f86b9 | 61 | USBRX = PE1, |
mbed_official | 525:c320967f86b9 | 62 | EFM_BC_EN = PF7, |
mbed_official | 525:c320967f86b9 | 63 | |
mbed_official | 525:c320967f86b9 | 64 | /* Not connected */ |
mbed_official | 525:c320967f86b9 | 65 | NC = (int) 0xFFFFFFFF |
mbed_official | 525:c320967f86b9 | 66 | } PinName; |
mbed_official | 525:c320967f86b9 | 67 | |
mbed_official | 525:c320967f86b9 | 68 | |
mbed_official | 525:c320967f86b9 | 69 | /* 0x10 represents setting the DOUT register (see efm32 modes in ref. manual) */ |
mbed_official | 525:c320967f86b9 | 70 | typedef enum { |
mbed_official | 525:c320967f86b9 | 71 | // EFM32 pin modes |
mbed_official | 525:c320967f86b9 | 72 | Disabled = gpioModeDisabled, |
mbed_official | 525:c320967f86b9 | 73 | DisabledPullUp = gpioModeDisabled | 0x10, |
mbed_official | 525:c320967f86b9 | 74 | Input = gpioModeInput, |
mbed_official | 525:c320967f86b9 | 75 | InputFilter = gpioModeInput | 0x10, |
mbed_official | 525:c320967f86b9 | 76 | InputPullDown = gpioModeInputPull, |
mbed_official | 525:c320967f86b9 | 77 | InputPullUp = gpioModeInputPull | 0x10, |
mbed_official | 525:c320967f86b9 | 78 | InputPullFilterDown = gpioModeInputPullFilter, |
mbed_official | 525:c320967f86b9 | 79 | InputPullFilterUp = gpioModeInputPullFilter | 0x10, |
mbed_official | 525:c320967f86b9 | 80 | PushPull = gpioModePushPull, |
mbed_official | 525:c320967f86b9 | 81 | PushPullDrive = gpioModePushPullDrive, |
mbed_official | 525:c320967f86b9 | 82 | WiredOr = gpioModeWiredOr, |
mbed_official | 525:c320967f86b9 | 83 | WiredOrPullDown = gpioModeWiredOrPullDown, |
mbed_official | 525:c320967f86b9 | 84 | WiredAnd = gpioModeWiredAnd, |
mbed_official | 525:c320967f86b9 | 85 | WiredAndFilter = gpioModeWiredAndFilter, |
mbed_official | 525:c320967f86b9 | 86 | WiredAndPullUp = gpioModeWiredAndPullUp, |
mbed_official | 525:c320967f86b9 | 87 | WiredAndPullUpFilter = gpioModeWiredAndPullUpFilter, |
mbed_official | 525:c320967f86b9 | 88 | WiredAndDrive = gpioModeWiredAndDrive, |
mbed_official | 525:c320967f86b9 | 89 | WiredAndDriveFilter = gpioModeWiredAndDriveFilter, |
mbed_official | 525:c320967f86b9 | 90 | WiredAndDrivePullUp = gpioModeWiredAndDrivePullUp, |
mbed_official | 525:c320967f86b9 | 91 | WiredAndDrivePullUpFilter = gpioModeWiredAndDrivePullUpFilter, |
mbed_official | 525:c320967f86b9 | 92 | |
mbed_official | 525:c320967f86b9 | 93 | /* mbed modes: |
mbed_official | 525:c320967f86b9 | 94 | * PullUp, PullDown, PullNone, OpenDrain |
mbed_official | 525:c320967f86b9 | 95 | * |
mbed_official | 525:c320967f86b9 | 96 | * mbed default digital input mode: |
mbed_official | 525:c320967f86b9 | 97 | * PullDefault |
mbed_official | 525:c320967f86b9 | 98 | * |
mbed_official | 525:c320967f86b9 | 99 | * mbed default digital output mode: |
mbed_official | 525:c320967f86b9 | 100 | * PullNone |
mbed_official | 525:c320967f86b9 | 101 | */ |
mbed_official | 525:c320967f86b9 | 102 | PullUp = InputPullUp, |
mbed_official | 525:c320967f86b9 | 103 | PullDown = InputPullDown, |
mbed_official | 525:c320967f86b9 | 104 | OpenDrain = WiredAnd, |
mbed_official | 525:c320967f86b9 | 105 | PullNone = PushPull, |
mbed_official | 593:78ee8643776a | 106 | PullDefault = PushPull |
mbed_official | 525:c320967f86b9 | 107 | } PinMode; |
mbed_official | 525:c320967f86b9 | 108 | |
mbed_official | 525:c320967f86b9 | 109 | #ifdef __cplusplus |
mbed_official | 525:c320967f86b9 | 110 | } |
mbed_official | 525:c320967f86b9 | 111 | #endif |
mbed_official | 525:c320967f86b9 | 112 | |
mbed_official | 525:c320967f86b9 | 113 | #endif |