mbed library sources change for ST sensors and ST BLE
Fork of mbed-src by
targets/hal/TARGET_Freescale/TARGET_KLXX/objects.h@363:12a245e5c745, 2014-10-23 (annotated)
- Committer:
- mbed_official
- Date:
- Thu Oct 23 09:45:08 2014 +0100
- Revision:
- 363:12a245e5c745
- Parent:
- 82:0b31dbcd4769
- Child:
- 585:a1ed5b41f74f
Synchronized with git revision 6ff7dfe464a15417f666938479c7860707707331
Full URL: https://github.com/mbedmicro/mbed/commit/6ff7dfe464a15417f666938479c7860707707331/
Target: Freescale FRDM-KL43Z addition
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 82:0b31dbcd4769 | 1 | /* mbed Microcontroller Library |
mbed_official | 82:0b31dbcd4769 | 2 | * Copyright (c) 2006-2013 ARM Limited |
mbed_official | 82:0b31dbcd4769 | 3 | * |
mbed_official | 82:0b31dbcd4769 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mbed_official | 82:0b31dbcd4769 | 5 | * you may not use this file except in compliance with the License. |
mbed_official | 82:0b31dbcd4769 | 6 | * You may obtain a copy of the License at |
mbed_official | 82:0b31dbcd4769 | 7 | * |
mbed_official | 82:0b31dbcd4769 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 82:0b31dbcd4769 | 9 | * |
mbed_official | 82:0b31dbcd4769 | 10 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 82:0b31dbcd4769 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 82:0b31dbcd4769 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 82:0b31dbcd4769 | 13 | * See the License for the specific language governing permissions and |
mbed_official | 82:0b31dbcd4769 | 14 | * limitations under the License. |
mbed_official | 82:0b31dbcd4769 | 15 | */ |
mbed_official | 82:0b31dbcd4769 | 16 | #ifndef MBED_OBJECTS_H |
mbed_official | 82:0b31dbcd4769 | 17 | #define MBED_OBJECTS_H |
mbed_official | 82:0b31dbcd4769 | 18 | |
mbed_official | 82:0b31dbcd4769 | 19 | #include "cmsis.h" |
mbed_official | 82:0b31dbcd4769 | 20 | #include "PortNames.h" |
mbed_official | 82:0b31dbcd4769 | 21 | #include "PeripheralNames.h" |
mbed_official | 82:0b31dbcd4769 | 22 | #include "PinNames.h" |
mbed_official | 82:0b31dbcd4769 | 23 | |
mbed_official | 82:0b31dbcd4769 | 24 | #ifdef __cplusplus |
mbed_official | 82:0b31dbcd4769 | 25 | extern "C" { |
mbed_official | 82:0b31dbcd4769 | 26 | #endif |
mbed_official | 82:0b31dbcd4769 | 27 | |
mbed_official | 363:12a245e5c745 | 28 | #if defined(TARGET_KL46Z) |
mbed_official | 82:0b31dbcd4769 | 29 | #define UARTLP_Type UART0_Type |
mbed_official | 363:12a245e5c745 | 30 | #elif defined(TARGET_KL43Z) |
mbed_official | 363:12a245e5c745 | 31 | #define UARTLP_Type LPUART_Type |
mbed_official | 82:0b31dbcd4769 | 32 | #endif |
mbed_official | 82:0b31dbcd4769 | 33 | |
mbed_official | 82:0b31dbcd4769 | 34 | struct gpio_irq_s { |
mbed_official | 82:0b31dbcd4769 | 35 | uint32_t port; |
mbed_official | 82:0b31dbcd4769 | 36 | uint32_t pin; |
mbed_official | 82:0b31dbcd4769 | 37 | uint32_t ch; |
mbed_official | 82:0b31dbcd4769 | 38 | }; |
mbed_official | 82:0b31dbcd4769 | 39 | |
mbed_official | 82:0b31dbcd4769 | 40 | struct port_s { |
mbed_official | 82:0b31dbcd4769 | 41 | __IO uint32_t *reg_dir; |
mbed_official | 82:0b31dbcd4769 | 42 | __IO uint32_t *reg_out; |
mbed_official | 82:0b31dbcd4769 | 43 | __I uint32_t *reg_in; |
mbed_official | 82:0b31dbcd4769 | 44 | PortName port; |
mbed_official | 82:0b31dbcd4769 | 45 | uint32_t mask; |
mbed_official | 82:0b31dbcd4769 | 46 | }; |
mbed_official | 82:0b31dbcd4769 | 47 | |
mbed_official | 82:0b31dbcd4769 | 48 | struct pwmout_s { |
mbed_official | 82:0b31dbcd4769 | 49 | __IO uint32_t *MOD; |
mbed_official | 82:0b31dbcd4769 | 50 | __IO uint32_t *CNT; |
mbed_official | 82:0b31dbcd4769 | 51 | __IO uint32_t *CnV; |
mbed_official | 82:0b31dbcd4769 | 52 | }; |
mbed_official | 82:0b31dbcd4769 | 53 | |
mbed_official | 82:0b31dbcd4769 | 54 | struct serial_s { |
mbed_official | 82:0b31dbcd4769 | 55 | UARTLP_Type *uart; |
mbed_official | 82:0b31dbcd4769 | 56 | int index; |
mbed_official | 82:0b31dbcd4769 | 57 | }; |
mbed_official | 82:0b31dbcd4769 | 58 | |
mbed_official | 82:0b31dbcd4769 | 59 | struct analogin_s { |
mbed_official | 82:0b31dbcd4769 | 60 | ADCName adc; |
mbed_official | 82:0b31dbcd4769 | 61 | }; |
mbed_official | 82:0b31dbcd4769 | 62 | |
mbed_official | 82:0b31dbcd4769 | 63 | struct dac_s { |
mbed_official | 82:0b31dbcd4769 | 64 | DACName dac; |
mbed_official | 82:0b31dbcd4769 | 65 | }; |
mbed_official | 82:0b31dbcd4769 | 66 | |
mbed_official | 82:0b31dbcd4769 | 67 | struct i2c_s { |
mbed_official | 82:0b31dbcd4769 | 68 | I2C_Type *i2c; |
mbed_official | 82:0b31dbcd4769 | 69 | }; |
mbed_official | 82:0b31dbcd4769 | 70 | |
mbed_official | 82:0b31dbcd4769 | 71 | struct spi_s { |
mbed_official | 82:0b31dbcd4769 | 72 | SPI_Type *spi; |
mbed_official | 82:0b31dbcd4769 | 73 | }; |
mbed_official | 82:0b31dbcd4769 | 74 | |
mbed_official | 82:0b31dbcd4769 | 75 | #include "gpio_object.h" |
mbed_official | 82:0b31dbcd4769 | 76 | |
mbed_official | 82:0b31dbcd4769 | 77 | #ifdef __cplusplus |
mbed_official | 82:0b31dbcd4769 | 78 | } |
mbed_official | 82:0b31dbcd4769 | 79 | #endif |
mbed_official | 82:0b31dbcd4769 | 80 | |
mbed_official | 82:0b31dbcd4769 | 81 | #endif |