mbed library sources change for ST sensors and ST BLE

Fork of mbed-src by mbed official

Committer:
NickZhouARM
Date:
Thu Apr 14 07:07:44 2016 +0000
Revision:
636:83ea0d2b909b
Parent:
585:a1ed5b41f74f
Working version for ST BLE + Sensors

Who changed what in which revision?

UserRevisionLine numberNew 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 585:a1ed5b41f74f 32 #elif defined(TARGET_KL26Z)
mbed_official 585:a1ed5b41f74f 33 #define UARTLP_Type UART0_Type
mbed_official 82:0b31dbcd4769 34 #endif
mbed_official 82:0b31dbcd4769 35
mbed_official 82:0b31dbcd4769 36 struct gpio_irq_s {
mbed_official 82:0b31dbcd4769 37 uint32_t port;
mbed_official 82:0b31dbcd4769 38 uint32_t pin;
mbed_official 82:0b31dbcd4769 39 uint32_t ch;
mbed_official 82:0b31dbcd4769 40 };
mbed_official 82:0b31dbcd4769 41
mbed_official 82:0b31dbcd4769 42 struct port_s {
mbed_official 82:0b31dbcd4769 43 __IO uint32_t *reg_dir;
mbed_official 82:0b31dbcd4769 44 __IO uint32_t *reg_out;
mbed_official 82:0b31dbcd4769 45 __I uint32_t *reg_in;
mbed_official 82:0b31dbcd4769 46 PortName port;
mbed_official 82:0b31dbcd4769 47 uint32_t mask;
mbed_official 82:0b31dbcd4769 48 };
mbed_official 82:0b31dbcd4769 49
mbed_official 82:0b31dbcd4769 50 struct pwmout_s {
mbed_official 82:0b31dbcd4769 51 __IO uint32_t *MOD;
mbed_official 82:0b31dbcd4769 52 __IO uint32_t *CNT;
mbed_official 82:0b31dbcd4769 53 __IO uint32_t *CnV;
mbed_official 82:0b31dbcd4769 54 };
mbed_official 82:0b31dbcd4769 55
mbed_official 82:0b31dbcd4769 56 struct serial_s {
mbed_official 82:0b31dbcd4769 57 UARTLP_Type *uart;
mbed_official 82:0b31dbcd4769 58 int index;
mbed_official 82:0b31dbcd4769 59 };
mbed_official 82:0b31dbcd4769 60
mbed_official 82:0b31dbcd4769 61 struct analogin_s {
mbed_official 82:0b31dbcd4769 62 ADCName adc;
mbed_official 82:0b31dbcd4769 63 };
mbed_official 82:0b31dbcd4769 64
mbed_official 82:0b31dbcd4769 65 struct dac_s {
mbed_official 82:0b31dbcd4769 66 DACName dac;
mbed_official 82:0b31dbcd4769 67 };
mbed_official 82:0b31dbcd4769 68
mbed_official 82:0b31dbcd4769 69 struct i2c_s {
mbed_official 82:0b31dbcd4769 70 I2C_Type *i2c;
mbed_official 82:0b31dbcd4769 71 };
mbed_official 82:0b31dbcd4769 72
mbed_official 82:0b31dbcd4769 73 struct spi_s {
mbed_official 82:0b31dbcd4769 74 SPI_Type *spi;
mbed_official 82:0b31dbcd4769 75 };
mbed_official 82:0b31dbcd4769 76
mbed_official 82:0b31dbcd4769 77 #include "gpio_object.h"
mbed_official 82:0b31dbcd4769 78
mbed_official 82:0b31dbcd4769 79 #ifdef __cplusplus
mbed_official 82:0b31dbcd4769 80 }
mbed_official 82:0b31dbcd4769 81 #endif
mbed_official 82:0b31dbcd4769 82
mbed_official 82:0b31dbcd4769 83 #endif