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