BA / Mbed OS BaBoRo1
Committer:
borlanic
Date:
Thu Mar 29 07:02:09 2018 +0000
Revision:
0:380207fcb5c1
Encoder, IMU --> OK; Controller --> in bearbeitung

Who changed what in which revision?

UserRevisionLine numberNew contents of line
borlanic 0:380207fcb5c1 1 /* mbed Microcontroller Library
borlanic 0:380207fcb5c1 2 * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved
borlanic 0:380207fcb5c1 3 *
borlanic 0:380207fcb5c1 4 * Licensed under the Apache License, Version 2.0 (the "License");
borlanic 0:380207fcb5c1 5 * you may not use this file except in compliance with the License.
borlanic 0:380207fcb5c1 6 * You may obtain a copy of the License at
borlanic 0:380207fcb5c1 7 *
borlanic 0:380207fcb5c1 8 * http://www.apache.org/licenses/LICENSE-2.0
borlanic 0:380207fcb5c1 9 *
borlanic 0:380207fcb5c1 10 * Unless required by applicable law or agreed to in writing, software
borlanic 0:380207fcb5c1 11 * distributed under the License is distributed on an "AS IS" BASIS,
borlanic 0:380207fcb5c1 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
borlanic 0:380207fcb5c1 13 * See the License for the specific language governing permissions and
borlanic 0:380207fcb5c1 14 * limitations under the License.
borlanic 0:380207fcb5c1 15 */
borlanic 0:380207fcb5c1 16 #ifndef MBED_OBJECTS_H
borlanic 0:380207fcb5c1 17 #define MBED_OBJECTS_H
borlanic 0:380207fcb5c1 18
borlanic 0:380207fcb5c1 19 #include "PortNames.h"
borlanic 0:380207fcb5c1 20 #include "PeripheralNames.h"
borlanic 0:380207fcb5c1 21 #include "tmpm066_gpio.h"
borlanic 0:380207fcb5c1 22 #include "tmpm066_uart.h"
borlanic 0:380207fcb5c1 23 #include "tmpm066_cg.h"
borlanic 0:380207fcb5c1 24 #include "tmpm066_intifao.h"
borlanic 0:380207fcb5c1 25 #include "tmpm066_i2c.h"
borlanic 0:380207fcb5c1 26 #include "tmpm066_adc.h"
borlanic 0:380207fcb5c1 27
borlanic 0:380207fcb5c1 28 #ifdef __cplusplus
borlanic 0:380207fcb5c1 29 extern "C" {
borlanic 0:380207fcb5c1 30 #endif
borlanic 0:380207fcb5c1 31
borlanic 0:380207fcb5c1 32 struct gpio_irq_s {
borlanic 0:380207fcb5c1 33 uint32_t mask;
borlanic 0:380207fcb5c1 34 GPIO_Port port;
borlanic 0:380207fcb5c1 35 uint32_t irq_id;
borlanic 0:380207fcb5c1 36 INTIFAO_INTActiveState event;
borlanic 0:380207fcb5c1 37 INTIFAO_INTSrc irq_src;
borlanic 0:380207fcb5c1 38 };
borlanic 0:380207fcb5c1 39
borlanic 0:380207fcb5c1 40 struct port_s {
borlanic 0:380207fcb5c1 41 PortName port;
borlanic 0:380207fcb5c1 42 uint32_t mask;
borlanic 0:380207fcb5c1 43 };
borlanic 0:380207fcb5c1 44
borlanic 0:380207fcb5c1 45 struct pwmout_s {
borlanic 0:380207fcb5c1 46 PinName pin;
borlanic 0:380207fcb5c1 47 TSB_TB_TypeDef *channel;
borlanic 0:380207fcb5c1 48 uint16_t trailing_timing;
borlanic 0:380207fcb5c1 49 uint16_t leading_timing;
borlanic 0:380207fcb5c1 50 uint16_t divisor;
borlanic 0:380207fcb5c1 51 float period;
borlanic 0:380207fcb5c1 52 };
borlanic 0:380207fcb5c1 53
borlanic 0:380207fcb5c1 54 struct serial_s {
borlanic 0:380207fcb5c1 55 PinName pin;
borlanic 0:380207fcb5c1 56 uint32_t index;
borlanic 0:380207fcb5c1 57 TSB_SC_TypeDef *UARTx;
borlanic 0:380207fcb5c1 58 UART_InitTypeDef uart_config;
borlanic 0:380207fcb5c1 59 };
borlanic 0:380207fcb5c1 60
borlanic 0:380207fcb5c1 61 struct analogin_s {
borlanic 0:380207fcb5c1 62 PinName pin;
borlanic 0:380207fcb5c1 63 ADCName adc;
borlanic 0:380207fcb5c1 64 TSB_AD_TypeDef *obj;
borlanic 0:380207fcb5c1 65 };
borlanic 0:380207fcb5c1 66
borlanic 0:380207fcb5c1 67 struct i2c_s {
borlanic 0:380207fcb5c1 68 uint32_t address;
borlanic 0:380207fcb5c1 69 IRQn_Type IRQn;
borlanic 0:380207fcb5c1 70 TSB_I2C_TypeDef *i2c;
borlanic 0:380207fcb5c1 71 I2C_InitTypeDef myi2c;
borlanic 0:380207fcb5c1 72 };
borlanic 0:380207fcb5c1 73
borlanic 0:380207fcb5c1 74 #include "gpio_object.h"
borlanic 0:380207fcb5c1 75
borlanic 0:380207fcb5c1 76 #ifdef __cplusplus
borlanic 0:380207fcb5c1 77 }
borlanic 0:380207fcb5c1 78 #endif
borlanic 0:380207fcb5c1 79
borlanic 0:380207fcb5c1 80 #endif