helpfor studient

Dependents:   STM32_F103-C8T6basecanblink_led

Fork of mbed-dev by mbed official

Committer:
Anna Bridge
Date:
Fri Apr 20 11:31:35 2018 +0100
Revision:
186:9c2029bfadbe
Parent:
185:08ed48f1de7f
Update to latest version of mbed lib

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 185:08ed48f1de7f 1 /* mbed Microcontroller Library
AnnaBridge 185:08ed48f1de7f 2 * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved
AnnaBridge 185:08ed48f1de7f 3 *
AnnaBridge 185:08ed48f1de7f 4 * Licensed under the Apache License, Version 2.0 (the "License");
AnnaBridge 185:08ed48f1de7f 5 * you may not use this file except in compliance with the License.
AnnaBridge 185:08ed48f1de7f 6 * You may obtain a copy of the License at
AnnaBridge 185:08ed48f1de7f 7 *
AnnaBridge 185:08ed48f1de7f 8 * http://www.apache.org/licenses/LICENSE-2.0
AnnaBridge 185:08ed48f1de7f 9 *
AnnaBridge 185:08ed48f1de7f 10 * Unless required by applicable law or agreed to in writing, software
AnnaBridge 185:08ed48f1de7f 11 * distributed under the License is distributed on an "AS IS" BASIS,
AnnaBridge 185:08ed48f1de7f 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
AnnaBridge 185:08ed48f1de7f 13 * See the License for the specific language governing permissions and
AnnaBridge 185:08ed48f1de7f 14 * limitations under the License.
AnnaBridge 185:08ed48f1de7f 15 */
AnnaBridge 185:08ed48f1de7f 16 #ifndef MBED_OBJECTS_H
AnnaBridge 185:08ed48f1de7f 17 #define MBED_OBJECTS_H
AnnaBridge 185:08ed48f1de7f 18
AnnaBridge 185:08ed48f1de7f 19 #include <stdbool.h>
AnnaBridge 185:08ed48f1de7f 20 #include "PortNames.h"
AnnaBridge 185:08ed48f1de7f 21 #include "PeripheralNames.h"
AnnaBridge 185:08ed48f1de7f 22 #include "tmpm46b_gpio.h"
AnnaBridge 185:08ed48f1de7f 23 #include "tmpm46b_uart.h"
AnnaBridge 185:08ed48f1de7f 24 #include "tmpm46b_fuart.h"
AnnaBridge 185:08ed48f1de7f 25 #include "tmpm46b_cg.h"
AnnaBridge 185:08ed48f1de7f 26 #include "tmpm46b_i2c.h"
AnnaBridge 185:08ed48f1de7f 27 #include "tmpm46b_adc.h"
AnnaBridge 185:08ed48f1de7f 28
AnnaBridge 185:08ed48f1de7f 29 #ifdef __cplusplus
AnnaBridge 185:08ed48f1de7f 30 extern "C" {
AnnaBridge 185:08ed48f1de7f 31 #endif
AnnaBridge 185:08ed48f1de7f 32
AnnaBridge 185:08ed48f1de7f 33 struct gpio_irq_s {
AnnaBridge 185:08ed48f1de7f 34 uint32_t mask;
AnnaBridge 185:08ed48f1de7f 35 GPIO_Port port;
AnnaBridge 185:08ed48f1de7f 36 uint32_t irq_id;
AnnaBridge 185:08ed48f1de7f 37 CG_INTActiveState event;
AnnaBridge 185:08ed48f1de7f 38 CG_INTSrc irq_src;
AnnaBridge 185:08ed48f1de7f 39 };
AnnaBridge 185:08ed48f1de7f 40
AnnaBridge 185:08ed48f1de7f 41 struct port_s {
AnnaBridge 185:08ed48f1de7f 42 PortName port;
AnnaBridge 185:08ed48f1de7f 43 uint32_t mask;
AnnaBridge 185:08ed48f1de7f 44 };
AnnaBridge 185:08ed48f1de7f 45
AnnaBridge 185:08ed48f1de7f 46 struct pwmout_s {
AnnaBridge 185:08ed48f1de7f 47 PinName pin;
AnnaBridge 185:08ed48f1de7f 48 TSB_TB_TypeDef * channel;
AnnaBridge 185:08ed48f1de7f 49 uint16_t trailing_timing;
AnnaBridge 185:08ed48f1de7f 50 uint16_t leading_timing;
AnnaBridge 185:08ed48f1de7f 51 uint16_t divisor;
AnnaBridge 185:08ed48f1de7f 52 float period;
AnnaBridge 185:08ed48f1de7f 53 };
AnnaBridge 185:08ed48f1de7f 54
AnnaBridge 185:08ed48f1de7f 55 struct serial_s {
AnnaBridge 185:08ed48f1de7f 56 PinName pin;
AnnaBridge 185:08ed48f1de7f 57 uint32_t index;
AnnaBridge 185:08ed48f1de7f 58 TSB_SC_TypeDef * UARTx;
AnnaBridge 185:08ed48f1de7f 59 TSB_FUART_TypeDef *FUART;
AnnaBridge 185:08ed48f1de7f 60 UART_InitTypeDef uart_config;
AnnaBridge 185:08ed48f1de7f 61 FUART_InitTypeDef fuart_config;
AnnaBridge 185:08ed48f1de7f 62 TSB_UART_TypeDef *FUART_Reg;
AnnaBridge 185:08ed48f1de7f 63 };
AnnaBridge 185:08ed48f1de7f 64
AnnaBridge 185:08ed48f1de7f 65 struct analogin_s {
AnnaBridge 185:08ed48f1de7f 66 PinName pin;
AnnaBridge 185:08ed48f1de7f 67 ADCName adc;
AnnaBridge 185:08ed48f1de7f 68 TSB_AD_TypeDef* obj;
AnnaBridge 185:08ed48f1de7f 69 ADC_AINx channel;
AnnaBridge 185:08ed48f1de7f 70 };
AnnaBridge 185:08ed48f1de7f 71
AnnaBridge 185:08ed48f1de7f 72 struct i2c_s {
AnnaBridge 185:08ed48f1de7f 73 uint32_t index;
AnnaBridge 185:08ed48f1de7f 74 int address;
AnnaBridge 185:08ed48f1de7f 75 IRQn_Type IRQn;
AnnaBridge 185:08ed48f1de7f 76 TSB_I2C_TypeDef *i2c;
AnnaBridge 185:08ed48f1de7f 77 I2C_InitTypeDef myi2c;
AnnaBridge 185:08ed48f1de7f 78 };
AnnaBridge 185:08ed48f1de7f 79
AnnaBridge 185:08ed48f1de7f 80 struct spi_s {
AnnaBridge 185:08ed48f1de7f 81 TSB_SSP_TypeDef *spi;
AnnaBridge 185:08ed48f1de7f 82 SPIName module;
AnnaBridge 185:08ed48f1de7f 83 uint8_t bits;
AnnaBridge 185:08ed48f1de7f 84 };
AnnaBridge 185:08ed48f1de7f 85
AnnaBridge 185:08ed48f1de7f 86 struct trng_s {
AnnaBridge 185:08ed48f1de7f 87 bool trng_init;
AnnaBridge 185:08ed48f1de7f 88 };
AnnaBridge 185:08ed48f1de7f 89
AnnaBridge 185:08ed48f1de7f 90 struct flash_s {
AnnaBridge 185:08ed48f1de7f 91 uint8_t dummy;
AnnaBridge 185:08ed48f1de7f 92 };
AnnaBridge 185:08ed48f1de7f 93 #include "gpio_object.h"
AnnaBridge 185:08ed48f1de7f 94
AnnaBridge 185:08ed48f1de7f 95 #ifdef __cplusplus
AnnaBridge 185:08ed48f1de7f 96 }
AnnaBridge 185:08ed48f1de7f 97 #endif
AnnaBridge 185:08ed48f1de7f 98
AnnaBridge 185:08ed48f1de7f 99 #endif