mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
targets/TARGET_TOSHIBA/TARGET_TMPM3HQ/objects.h@189:f392fc9709a3, 2019-02-20 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Feb 20 22:31:08 2019 +0000
- Revision:
- 189:f392fc9709a3
mbed library release version 165
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 189:f392fc9709a3 | 1 | /* mbed Microcontroller Library |
AnnaBridge | 189:f392fc9709a3 | 2 | * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2018 All rights reserved |
AnnaBridge | 189:f392fc9709a3 | 3 | * |
AnnaBridge | 189:f392fc9709a3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
AnnaBridge | 189:f392fc9709a3 | 5 | * you may not use this file except in compliance with the License. |
AnnaBridge | 189:f392fc9709a3 | 6 | * You may obtain a copy of the License at |
AnnaBridge | 189:f392fc9709a3 | 7 | * |
AnnaBridge | 189:f392fc9709a3 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
AnnaBridge | 189:f392fc9709a3 | 9 | * |
AnnaBridge | 189:f392fc9709a3 | 10 | * Unless required by applicable law or agreed to in writing, software |
AnnaBridge | 189:f392fc9709a3 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
AnnaBridge | 189:f392fc9709a3 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
AnnaBridge | 189:f392fc9709a3 | 13 | * See the License for the specific language governing permissions and |
AnnaBridge | 189:f392fc9709a3 | 14 | * limitations under the License. |
AnnaBridge | 189:f392fc9709a3 | 15 | */ |
AnnaBridge | 189:f392fc9709a3 | 16 | #ifndef MBED_OBJECTS_H |
AnnaBridge | 189:f392fc9709a3 | 17 | #define MBED_OBJECTS_H |
AnnaBridge | 189:f392fc9709a3 | 18 | |
AnnaBridge | 189:f392fc9709a3 | 19 | #include <stddef.h> |
AnnaBridge | 189:f392fc9709a3 | 20 | #include "PortNames.h" |
AnnaBridge | 189:f392fc9709a3 | 21 | #include "PeripheralNames.h" |
AnnaBridge | 189:f392fc9709a3 | 22 | #include "txz_tspi.h" |
AnnaBridge | 189:f392fc9709a3 | 23 | #include "PinNames.h" |
AnnaBridge | 189:f392fc9709a3 | 24 | #include "TMPM3HQ.h" |
AnnaBridge | 189:f392fc9709a3 | 25 | #include "gpio_include.h" |
AnnaBridge | 189:f392fc9709a3 | 26 | |
AnnaBridge | 189:f392fc9709a3 | 27 | #ifdef __cplusplus |
AnnaBridge | 189:f392fc9709a3 | 28 | extern "C" { |
AnnaBridge | 189:f392fc9709a3 | 29 | #endif |
AnnaBridge | 189:f392fc9709a3 | 30 | |
AnnaBridge | 189:f392fc9709a3 | 31 | typedef struct { |
AnnaBridge | 189:f392fc9709a3 | 32 | uint32_t BaudRate; |
AnnaBridge | 189:f392fc9709a3 | 33 | uint32_t DataBits; |
AnnaBridge | 189:f392fc9709a3 | 34 | uint32_t StopBits; |
AnnaBridge | 189:f392fc9709a3 | 35 | uint32_t Parity; |
AnnaBridge | 189:f392fc9709a3 | 36 | uint32_t Mode; |
AnnaBridge | 189:f392fc9709a3 | 37 | uint32_t FlowCtrl; |
AnnaBridge | 189:f392fc9709a3 | 38 | } uart_inittypedef_t; |
AnnaBridge | 189:f392fc9709a3 | 39 | |
AnnaBridge | 189:f392fc9709a3 | 40 | struct port_s { |
AnnaBridge | 189:f392fc9709a3 | 41 | PortName port; |
AnnaBridge | 189:f392fc9709a3 | 42 | uint32_t mask; |
AnnaBridge | 189:f392fc9709a3 | 43 | }; |
AnnaBridge | 189:f392fc9709a3 | 44 | |
AnnaBridge | 189:f392fc9709a3 | 45 | typedef struct { |
AnnaBridge | 189:f392fc9709a3 | 46 | uint8_t PinDATA; |
AnnaBridge | 189:f392fc9709a3 | 47 | uint8_t PinCR; |
AnnaBridge | 189:f392fc9709a3 | 48 | uint8_t PinFR[7]; |
AnnaBridge | 189:f392fc9709a3 | 49 | uint8_t PinOD; |
AnnaBridge | 189:f392fc9709a3 | 50 | uint8_t PinPUP; |
AnnaBridge | 189:f392fc9709a3 | 51 | uint8_t PinPDN; |
AnnaBridge | 189:f392fc9709a3 | 52 | uint8_t PinIE; |
AnnaBridge | 189:f392fc9709a3 | 53 | } gpio_regtypedef_t; |
AnnaBridge | 189:f392fc9709a3 | 54 | |
AnnaBridge | 189:f392fc9709a3 | 55 | typedef struct { |
AnnaBridge | 189:f392fc9709a3 | 56 | __IO uint32_t DATA; |
AnnaBridge | 189:f392fc9709a3 | 57 | __IO uint32_t CR; |
AnnaBridge | 189:f392fc9709a3 | 58 | __IO uint32_t FR[7]; |
AnnaBridge | 189:f392fc9709a3 | 59 | uint32_t RESERVED0[1]; |
AnnaBridge | 189:f392fc9709a3 | 60 | __IO uint32_t OD; |
AnnaBridge | 189:f392fc9709a3 | 61 | __IO uint32_t PUP; |
AnnaBridge | 189:f392fc9709a3 | 62 | __IO uint32_t PDN; |
AnnaBridge | 189:f392fc9709a3 | 63 | uint32_t RESERVED1; |
AnnaBridge | 189:f392fc9709a3 | 64 | __IO uint32_t IE; |
AnnaBridge | 189:f392fc9709a3 | 65 | } TSB_Port_TypeDef; |
AnnaBridge | 189:f392fc9709a3 | 66 | |
AnnaBridge | 189:f392fc9709a3 | 67 | struct serial_s { |
AnnaBridge | 189:f392fc9709a3 | 68 | PinName pin; |
AnnaBridge | 189:f392fc9709a3 | 69 | uint32_t index; |
AnnaBridge | 189:f392fc9709a3 | 70 | TSB_UART_TypeDef *UARTx; |
AnnaBridge | 189:f392fc9709a3 | 71 | uart_inittypedef_t uart_config; |
AnnaBridge | 189:f392fc9709a3 | 72 | }; |
AnnaBridge | 189:f392fc9709a3 | 73 | |
AnnaBridge | 189:f392fc9709a3 | 74 | struct analogin_s { |
AnnaBridge | 189:f392fc9709a3 | 75 | PinName pin; |
AnnaBridge | 189:f392fc9709a3 | 76 | ADCName adc; |
AnnaBridge | 189:f392fc9709a3 | 77 | TSB_AD_TypeDef *obj; |
AnnaBridge | 189:f392fc9709a3 | 78 | }; |
AnnaBridge | 189:f392fc9709a3 | 79 | |
AnnaBridge | 189:f392fc9709a3 | 80 | struct dac_s { |
AnnaBridge | 189:f392fc9709a3 | 81 | DACName dac; |
AnnaBridge | 189:f392fc9709a3 | 82 | TSB_DA_TypeDef *handler; |
AnnaBridge | 189:f392fc9709a3 | 83 | }; |
AnnaBridge | 189:f392fc9709a3 | 84 | |
AnnaBridge | 189:f392fc9709a3 | 85 | struct pwmout_s { |
AnnaBridge | 189:f392fc9709a3 | 86 | PinName pin; |
AnnaBridge | 189:f392fc9709a3 | 87 | TSB_T32A_TypeDef *channel; |
AnnaBridge | 189:f392fc9709a3 | 88 | uint16_t trailing_timing; |
AnnaBridge | 189:f392fc9709a3 | 89 | uint16_t leading_timing; |
AnnaBridge | 189:f392fc9709a3 | 90 | uint16_t divisor; |
AnnaBridge | 189:f392fc9709a3 | 91 | float period; |
AnnaBridge | 189:f392fc9709a3 | 92 | }; |
AnnaBridge | 189:f392fc9709a3 | 93 | |
AnnaBridge | 189:f392fc9709a3 | 94 | struct i2c_s { |
AnnaBridge | 189:f392fc9709a3 | 95 | uint32_t address; |
AnnaBridge | 189:f392fc9709a3 | 96 | IRQn_Type IRQn; |
AnnaBridge | 189:f392fc9709a3 | 97 | TSB_I2C_TypeDef *i2c; |
AnnaBridge | 189:f392fc9709a3 | 98 | }; |
AnnaBridge | 189:f392fc9709a3 | 99 | |
AnnaBridge | 189:f392fc9709a3 | 100 | struct spi_s { |
AnnaBridge | 189:f392fc9709a3 | 101 | tspi_t p_obj; |
AnnaBridge | 189:f392fc9709a3 | 102 | SPIName module; |
AnnaBridge | 189:f392fc9709a3 | 103 | uint8_t bits; |
AnnaBridge | 189:f392fc9709a3 | 104 | }; |
AnnaBridge | 189:f392fc9709a3 | 105 | |
AnnaBridge | 189:f392fc9709a3 | 106 | extern const gpio_regtypedef_t GPIO_SFRs[]; |
AnnaBridge | 189:f392fc9709a3 | 107 | extern const uint32_t GPIO_Base[]; |
AnnaBridge | 189:f392fc9709a3 | 108 | |
AnnaBridge | 189:f392fc9709a3 | 109 | #include "gpio_object.h" |
AnnaBridge | 189:f392fc9709a3 | 110 | |
AnnaBridge | 189:f392fc9709a3 | 111 | #ifdef __cplusplus |
AnnaBridge | 189:f392fc9709a3 | 112 | } |
AnnaBridge | 189:f392fc9709a3 | 113 | #endif |
AnnaBridge | 189:f392fc9709a3 | 114 | |
AnnaBridge | 189:f392fc9709a3 | 115 | #endif |