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