mbed-os

Dependents:   cobaLCDJoyMotor_Thread odometry_omni_3roda_v3 odometry_omni_3roda_v1 odometry_omni_3roda_v2 ... more

Committer:
be_bryan
Date:
Mon Dec 11 17:54:04 2017 +0000
Revision:
0:b74591d5ab33
motor ++

Who changed what in which revision?

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