The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
emilmont
Date:
Tue Feb 18 15:02:39 2014 +0000
Revision:
78:ed8466a608b4
Add KL05Z Target
Fix LPC11XX InterruptIn
Fix NUCLEO boards us_ticker
Fix NUCLEO_L152RE AnalogOut

Who changed what in which revision?

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