[11U68]fix P0_11 to use GPIO
Fork of mbed-src by
targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/objects.h@556:a217bc785985, 2015-06-03 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Jun 03 08:30:08 2015 +0100
- Revision:
- 556:a217bc785985
- Parent:
- 548:1abac31e188e
Synchronized with git revision dd1ab3a5e660410cfbfd2286c513ef820ed2d22f
Full URL: https://github.com/mbedmicro/mbed/commit/dd1ab3a5e660410cfbfd2286c513ef820ed2d22f/
Silicon Labs - Improvements in RAM footprint of HAL.
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_OBJECTS_H |
mbed_official | 525:c320967f86b9 | 17 | #define MBED_OBJECTS_H |
mbed_official | 525:c320967f86b9 | 18 | |
mbed_official | 525:c320967f86b9 | 19 | #include "PinNames.h" |
mbed_official | 525:c320967f86b9 | 20 | #include "PeripheralNames.h" |
mbed_official | 525:c320967f86b9 | 21 | #include "PortNames.h" |
mbed_official | 525:c320967f86b9 | 22 | #include "em_i2c.h" |
mbed_official | 525:c320967f86b9 | 23 | #include "em_dma.h" |
mbed_official | 525:c320967f86b9 | 24 | #include "em_cmu.h" |
mbed_official | 525:c320967f86b9 | 25 | #include "dma_api_HAL.h" |
mbed_official | 525:c320967f86b9 | 26 | |
mbed_official | 525:c320967f86b9 | 27 | #ifdef __cplusplus |
mbed_official | 525:c320967f86b9 | 28 | extern "C" { |
mbed_official | 525:c320967f86b9 | 29 | #endif |
mbed_official | 525:c320967f86b9 | 30 | |
mbed_official | 525:c320967f86b9 | 31 | #if DEVICE_ANALOGIN |
mbed_official | 525:c320967f86b9 | 32 | struct analogin_s { |
mbed_official | 525:c320967f86b9 | 33 | ADC_TypeDef *adc; |
mbed_official | 525:c320967f86b9 | 34 | uint32_t channel; |
mbed_official | 525:c320967f86b9 | 35 | }; |
mbed_official | 525:c320967f86b9 | 36 | #endif |
mbed_official | 525:c320967f86b9 | 37 | |
mbed_official | 525:c320967f86b9 | 38 | #if DEVICE_ANALOGOUT |
mbed_official | 525:c320967f86b9 | 39 | struct dac_s { |
mbed_official | 525:c320967f86b9 | 40 | DAC_TypeDef *dac; |
mbed_official | 525:c320967f86b9 | 41 | uint32_t channel; |
mbed_official | 525:c320967f86b9 | 42 | }; |
mbed_official | 525:c320967f86b9 | 43 | #endif |
mbed_official | 525:c320967f86b9 | 44 | |
mbed_official | 525:c320967f86b9 | 45 | #if DEVICE_I2C |
mbed_official | 525:c320967f86b9 | 46 | struct i2c_s { |
mbed_official | 525:c320967f86b9 | 47 | I2C_TypeDef *i2c; |
mbed_official | 525:c320967f86b9 | 48 | int loc; |
mbed_official | 525:c320967f86b9 | 49 | uint8_t index; |
mbed_official | 525:c320967f86b9 | 50 | PinName sda; |
mbed_official | 525:c320967f86b9 | 51 | PinName scl; |
mbed_official | 525:c320967f86b9 | 52 | uint32_t clock; |
mbed_official | 525:c320967f86b9 | 53 | #if DEVICE_I2C_ASYNCH |
mbed_official | 525:c320967f86b9 | 54 | uint32_t events; |
mbed_official | 525:c320967f86b9 | 55 | I2C_TransferSeq_TypeDef xfer; |
mbed_official | 525:c320967f86b9 | 56 | #endif |
mbed_official | 525:c320967f86b9 | 57 | }; |
mbed_official | 525:c320967f86b9 | 58 | #endif |
mbed_official | 525:c320967f86b9 | 59 | |
mbed_official | 525:c320967f86b9 | 60 | #if DEVICE_PORTOUT |
mbed_official | 525:c320967f86b9 | 61 | struct port_s { |
mbed_official | 525:c320967f86b9 | 62 | PortName port; |
mbed_official | 525:c320967f86b9 | 63 | uint32_t mask; |
mbed_official | 525:c320967f86b9 | 64 | PinDirection dir; |
mbed_official | 525:c320967f86b9 | 65 | }; |
mbed_official | 525:c320967f86b9 | 66 | #endif |
mbed_official | 525:c320967f86b9 | 67 | |
mbed_official | 525:c320967f86b9 | 68 | #if DEVICE_PWMOUT |
mbed_official | 525:c320967f86b9 | 69 | struct pwmout_s { |
mbed_official | 525:c320967f86b9 | 70 | //The period of the pulse in clock cycles |
mbed_official | 556:a217bc785985 | 71 | uint16_t period_cycles; |
mbed_official | 525:c320967f86b9 | 72 | //The width of the pulse in clock cycles |
mbed_official | 556:a217bc785985 | 73 | uint16_t width_cycles; |
mbed_official | 525:c320967f86b9 | 74 | //Channel on TIMER |
mbed_official | 525:c320967f86b9 | 75 | uint32_t channel; |
mbed_official | 525:c320967f86b9 | 76 | PinName pin; |
mbed_official | 525:c320967f86b9 | 77 | }; |
mbed_official | 525:c320967f86b9 | 78 | #endif |
mbed_official | 525:c320967f86b9 | 79 | |
mbed_official | 525:c320967f86b9 | 80 | #if DEVICE_INTERRUPTIN |
mbed_official | 525:c320967f86b9 | 81 | struct gpio_irq_s { |
mbed_official | 525:c320967f86b9 | 82 | uint32_t port; |
mbed_official | 525:c320967f86b9 | 83 | PinName pin; |
mbed_official | 525:c320967f86b9 | 84 | uint32_t risingEdge; |
mbed_official | 525:c320967f86b9 | 85 | uint32_t fallingEdge; |
mbed_official | 525:c320967f86b9 | 86 | }; |
mbed_official | 525:c320967f86b9 | 87 | #endif |
mbed_official | 525:c320967f86b9 | 88 | |
mbed_official | 525:c320967f86b9 | 89 | #if DEVICE_SERIAL |
mbed_official | 525:c320967f86b9 | 90 | #define SERIAL_NUM_UARTS (7) |
mbed_official | 525:c320967f86b9 | 91 | |
mbed_official | 525:c320967f86b9 | 92 | struct serial_s { |
mbed_official | 525:c320967f86b9 | 93 | union { |
mbed_official | 525:c320967f86b9 | 94 | USART_TypeDef *uart; |
mbed_official | 525:c320967f86b9 | 95 | LEUART_TypeDef *leuart; |
mbed_official | 525:c320967f86b9 | 96 | } periph; |
mbed_official | 525:c320967f86b9 | 97 | uint32_t location; |
mbed_official | 525:c320967f86b9 | 98 | PinName rx_pin; |
mbed_official | 525:c320967f86b9 | 99 | PinName tx_pin; |
mbed_official | 525:c320967f86b9 | 100 | #if DEVICE_SERIAL_ASYNCH |
mbed_official | 525:c320967f86b9 | 101 | uint32_t events; |
mbed_official | 525:c320967f86b9 | 102 | DMA_OPTIONS_t dmaOptionsTX; |
mbed_official | 525:c320967f86b9 | 103 | DMA_OPTIONS_t dmaOptionsRX; |
mbed_official | 525:c320967f86b9 | 104 | #endif |
mbed_official | 525:c320967f86b9 | 105 | }; |
mbed_official | 525:c320967f86b9 | 106 | #endif |
mbed_official | 525:c320967f86b9 | 107 | |
mbed_official | 525:c320967f86b9 | 108 | #if DEVICE_SPI |
mbed_official | 525:c320967f86b9 | 109 | struct spi_s { |
mbed_official | 525:c320967f86b9 | 110 | USART_TypeDef *spi; |
mbed_official | 525:c320967f86b9 | 111 | int location; |
mbed_official | 525:c320967f86b9 | 112 | uint8_t bits; |
mbed_official | 525:c320967f86b9 | 113 | uint8_t master; |
mbed_official | 525:c320967f86b9 | 114 | #if DEVICE_SPI_ASYNCH |
mbed_official | 525:c320967f86b9 | 115 | uint32_t event; |
mbed_official | 525:c320967f86b9 | 116 | DMA_OPTIONS_t dmaOptionsTX; |
mbed_official | 525:c320967f86b9 | 117 | DMA_OPTIONS_t dmaOptionsRX; |
mbed_official | 525:c320967f86b9 | 118 | #endif |
mbed_official | 525:c320967f86b9 | 119 | }; |
mbed_official | 525:c320967f86b9 | 120 | #endif |
mbed_official | 525:c320967f86b9 | 121 | |
mbed_official | 525:c320967f86b9 | 122 | #if DEVICE_RTC |
mbed_official | 525:c320967f86b9 | 123 | struct lp_timer_s { |
mbed_official | 525:c320967f86b9 | 124 | uint32_t start; |
mbed_official | 525:c320967f86b9 | 125 | uint32_t stop; |
mbed_official | 525:c320967f86b9 | 126 | }; |
mbed_official | 525:c320967f86b9 | 127 | #endif |
mbed_official | 525:c320967f86b9 | 128 | |
mbed_official | 525:c320967f86b9 | 129 | #if DEVICE_SLEEP |
mbed_official | 525:c320967f86b9 | 130 | #define NUM_SLEEP_MODES 5 |
mbed_official | 525:c320967f86b9 | 131 | typedef enum { |
mbed_official | 548:1abac31e188e | 132 | EM0 = 0, |
mbed_official | 548:1abac31e188e | 133 | EM1 = 1, |
mbed_official | 548:1abac31e188e | 134 | EM2 = 2, |
mbed_official | 548:1abac31e188e | 135 | EM3 = 3, |
mbed_official | 548:1abac31e188e | 136 | EM4 = 4 |
mbed_official | 525:c320967f86b9 | 137 | } sleepstate_enum; |
mbed_official | 525:c320967f86b9 | 138 | #endif |
mbed_official | 525:c320967f86b9 | 139 | |
mbed_official | 525:c320967f86b9 | 140 | #include "gpio_object.h" |
mbed_official | 525:c320967f86b9 | 141 | |
mbed_official | 525:c320967f86b9 | 142 | #ifdef __cplusplus |
mbed_official | 525:c320967f86b9 | 143 | } |
mbed_official | 525:c320967f86b9 | 144 | #endif |
mbed_official | 525:c320967f86b9 | 145 | |
mbed_official | 525:c320967f86b9 | 146 | #endif |