rau cha / mbed-src-I2CWaitFix

Fork of mbed-src by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers objects.h Source File

objects.h

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2006-2013 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #ifndef MBED_OBJECTS_H
00017 #define MBED_OBJECTS_H
00018 
00019 #include "cmsis.h"
00020 #include "PortNames.h"
00021 #include "PeripheralNames.h"
00022 #include "PinNames.h"
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 struct gpio_irq_s {
00029     uint32_t ch;
00030 };
00031 
00032 struct port_s {
00033     __IO uint32_t *reg_dir;
00034     __IO uint32_t *reg_mpin;
00035     PortName port;
00036     uint32_t mask;
00037 };
00038 
00039 struct pwmout_s {
00040     PWMName pwm;
00041 };
00042 
00043 struct serial_s {
00044     LPC_USART_Type *uart;
00045     int index;
00046 };
00047 
00048 struct analogin_s {
00049     ADCName adc;
00050 };
00051 
00052 struct i2c_s {
00053     LPC_I2C_Type *i2c;
00054 };
00055 
00056 struct spi_s {
00057     LPC_SSPx_Type *spi;
00058 };
00059 
00060 #include "gpio_object.h"
00061 
00062 #ifdef __cplusplus
00063 }
00064 #endif
00065 
00066 #endif