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:
Fri Feb 14 14:36:43 2014 +0000
Revision:
77:869cf507173a
Release 77 of the mbed library

Main changes:
* Add target NUCLEO_F030R8
* Add target NUCLEO_F401RE
* Add target NUCLEO_F103RB
* Add target NUCLEO_L152RE

Who changed what in which revision?

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