mbed library sources

Fork of mbed-src by mbed official

Committer:
HiAlgoBoost
Date:
Sun Aug 09 05:18:54 2015 +0000
Revision:
603:f00c7e78e8b4
Parent:
489:119543c9f674
Evening of August 8th version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 445:3312ed629f01 1 /* mbed Microcontroller Library
mbed_official 445:3312ed629f01 2 * Copyright (c) 2006-2015 ARM Limited
mbed_official 445:3312ed629f01 3 *
mbed_official 445:3312ed629f01 4 * Licensed under the Apache License, Version 2.0 (the "License");
mbed_official 445:3312ed629f01 5 * you may not use this file except in compliance with the License.
mbed_official 445:3312ed629f01 6 * You may obtain a copy of the License at
mbed_official 445:3312ed629f01 7 *
mbed_official 445:3312ed629f01 8 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 445:3312ed629f01 9 *
mbed_official 445:3312ed629f01 10 * Unless required by applicable law or agreed to in writing, software
mbed_official 445:3312ed629f01 11 * distributed under the License is distributed on an "AS IS" BASIS,
mbed_official 445:3312ed629f01 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbed_official 445:3312ed629f01 13 * See the License for the specific language governing permissions and
mbed_official 445:3312ed629f01 14 * limitations under the License.
mbed_official 445:3312ed629f01 15 */
mbed_official 445:3312ed629f01 16 #ifndef MBED_OBJECTS_H
mbed_official 445:3312ed629f01 17 #define MBED_OBJECTS_H
mbed_official 445:3312ed629f01 18
mbed_official 445:3312ed629f01 19 #include "cmsis.h"
mbed_official 445:3312ed629f01 20 #include "PortNames.h"
mbed_official 445:3312ed629f01 21 #include "PeripheralNames.h"
mbed_official 445:3312ed629f01 22 #include "PinNames.h"
mbed_official 445:3312ed629f01 23
mbed_official 445:3312ed629f01 24 #ifdef __cplusplus
mbed_official 445:3312ed629f01 25 extern "C" {
mbed_official 445:3312ed629f01 26 #endif
mbed_official 445:3312ed629f01 27
mbed_official 445:3312ed629f01 28 struct gpio_irq_s {
mbed_official 445:3312ed629f01 29 uint32_t port;
mbed_official 445:3312ed629f01 30 uint32_t pin;
mbed_official 445:3312ed629f01 31 uint32_t ch;
mbed_official 445:3312ed629f01 32 };
mbed_official 445:3312ed629f01 33
mbed_official 445:3312ed629f01 34 struct port_s {
mbed_official 445:3312ed629f01 35 __IO uint32_t *reg_dir;
mbed_official 445:3312ed629f01 36 __IO uint32_t *reg_out;
mbed_official 445:3312ed629f01 37 __I uint32_t *reg_in;
mbed_official 445:3312ed629f01 38 PortName port;
mbed_official 445:3312ed629f01 39 uint32_t mask;
mbed_official 445:3312ed629f01 40 };
mbed_official 445:3312ed629f01 41
mbed_official 445:3312ed629f01 42 struct pwmout_s {
mbed_official 445:3312ed629f01 43 __IO uint32_t *MOD;
mbed_official 489:119543c9f674 44 __IO uint32_t *SYNC;
mbed_official 445:3312ed629f01 45 __IO uint32_t *CnV;
mbed_official 445:3312ed629f01 46 };
mbed_official 445:3312ed629f01 47
mbed_official 445:3312ed629f01 48 struct serial_s {
mbed_official 445:3312ed629f01 49 UART_Type *uart;
mbed_official 445:3312ed629f01 50 int index;
mbed_official 445:3312ed629f01 51 };
mbed_official 445:3312ed629f01 52
mbed_official 445:3312ed629f01 53 struct analogin_s {
mbed_official 445:3312ed629f01 54 ADCName adc;
mbed_official 445:3312ed629f01 55 };
mbed_official 445:3312ed629f01 56
mbed_official 445:3312ed629f01 57 #if DEVICE_ANALOGOUT
mbed_official 445:3312ed629f01 58 struct dac_s {
mbed_official 445:3312ed629f01 59 DACName dac;
mbed_official 445:3312ed629f01 60 };
mbed_official 445:3312ed629f01 61 #endif
mbed_official 445:3312ed629f01 62
mbed_official 445:3312ed629f01 63 struct i2c_s {
mbed_official 445:3312ed629f01 64 I2C_Type *i2c;
mbed_official 445:3312ed629f01 65 };
mbed_official 445:3312ed629f01 66
mbed_official 445:3312ed629f01 67 struct spi_s {
mbed_official 445:3312ed629f01 68 SPI_Type *spi;
mbed_official 445:3312ed629f01 69 };
mbed_official 445:3312ed629f01 70
mbed_official 445:3312ed629f01 71 #include "gpio_object.h"
mbed_official 445:3312ed629f01 72
mbed_official 445:3312ed629f01 73 #ifdef __cplusplus
mbed_official 445:3312ed629f01 74 }
mbed_official 445:3312ed629f01 75 #endif
mbed_official 445:3312ed629f01 76
mbed_official 445:3312ed629f01 77 #endif