Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mbed-os/targets/TARGET_Freescale/TARGET_K20XX/objects.h@4:75df35ef4fb6, 2018-03-30 (annotated)
- Committer:
 - borlanic
 - Date:
 - Fri Mar 30 14:07:05 2018 +0000
 - Revision:
 - 4:75df35ef4fb6
 - Parent:
 - 0:380207fcb5c1
 
commentar
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| borlanic | 0:380207fcb5c1 | 1 | /* mbed Microcontroller Library | 
| borlanic | 0:380207fcb5c1 | 2 | * Copyright (c) 2006-2015 ARM Limited | 
| 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 "cmsis.h" | 
| borlanic | 0:380207fcb5c1 | 20 | #include "PortNames.h" | 
| borlanic | 0:380207fcb5c1 | 21 | #include "PeripheralNames.h" | 
| borlanic | 0:380207fcb5c1 | 22 | #include "PinNames.h" | 
| borlanic | 0:380207fcb5c1 | 23 | |
| borlanic | 0:380207fcb5c1 | 24 | #ifdef __cplusplus | 
| borlanic | 0:380207fcb5c1 | 25 | extern "C" { | 
| borlanic | 0:380207fcb5c1 | 26 | #endif | 
| borlanic | 0:380207fcb5c1 | 27 | |
| borlanic | 0:380207fcb5c1 | 28 | struct gpio_irq_s { | 
| borlanic | 0:380207fcb5c1 | 29 | uint32_t port; | 
| borlanic | 0:380207fcb5c1 | 30 | uint32_t pin; | 
| borlanic | 0:380207fcb5c1 | 31 | uint32_t ch; | 
| borlanic | 0:380207fcb5c1 | 32 | }; | 
| borlanic | 0:380207fcb5c1 | 33 | |
| borlanic | 0:380207fcb5c1 | 34 | struct port_s { | 
| borlanic | 0:380207fcb5c1 | 35 | __IO uint32_t *reg_dir; | 
| borlanic | 0:380207fcb5c1 | 36 | __IO uint32_t *reg_out; | 
| borlanic | 0:380207fcb5c1 | 37 | __I uint32_t *reg_in; | 
| borlanic | 0:380207fcb5c1 | 38 | PortName port; | 
| borlanic | 0:380207fcb5c1 | 39 | uint32_t mask; | 
| borlanic | 0:380207fcb5c1 | 40 | }; | 
| borlanic | 0:380207fcb5c1 | 41 | |
| borlanic | 0:380207fcb5c1 | 42 | struct pwmout_s { | 
| borlanic | 0:380207fcb5c1 | 43 | __IO uint32_t *MOD; | 
| borlanic | 0:380207fcb5c1 | 44 | __IO uint32_t *SYNC; | 
| borlanic | 0:380207fcb5c1 | 45 | __IO uint32_t *CnV; | 
| borlanic | 0:380207fcb5c1 | 46 | }; | 
| borlanic | 0:380207fcb5c1 | 47 | |
| borlanic | 0:380207fcb5c1 | 48 | struct serial_s { | 
| borlanic | 0:380207fcb5c1 | 49 | UART_Type *uart; | 
| borlanic | 0:380207fcb5c1 | 50 | int index; | 
| borlanic | 0:380207fcb5c1 | 51 | }; | 
| borlanic | 0:380207fcb5c1 | 52 | |
| borlanic | 0:380207fcb5c1 | 53 | struct analogin_s { | 
| borlanic | 0:380207fcb5c1 | 54 | ADCName adc; | 
| borlanic | 0:380207fcb5c1 | 55 | }; | 
| borlanic | 0:380207fcb5c1 | 56 | |
| borlanic | 0:380207fcb5c1 | 57 | #if DEVICE_ANALOGOUT | 
| borlanic | 0:380207fcb5c1 | 58 | struct dac_s { | 
| borlanic | 0:380207fcb5c1 | 59 | DACName dac; | 
| borlanic | 0:380207fcb5c1 | 60 | }; | 
| borlanic | 0:380207fcb5c1 | 61 | #endif | 
| borlanic | 0:380207fcb5c1 | 62 | |
| borlanic | 0:380207fcb5c1 | 63 | struct i2c_s { | 
| borlanic | 0:380207fcb5c1 | 64 | I2C_Type *i2c; | 
| borlanic | 0:380207fcb5c1 | 65 | }; | 
| borlanic | 0:380207fcb5c1 | 66 | |
| borlanic | 0:380207fcb5c1 | 67 | struct spi_s { | 
| borlanic | 0:380207fcb5c1 | 68 | SPI_Type *spi; | 
| borlanic | 0:380207fcb5c1 | 69 | }; | 
| borlanic | 0:380207fcb5c1 | 70 | |
| borlanic | 0:380207fcb5c1 | 71 | #include "gpio_object.h" | 
| borlanic | 0:380207fcb5c1 | 72 | |
| borlanic | 0:380207fcb5c1 | 73 | #ifdef __cplusplus | 
| borlanic | 0:380207fcb5c1 | 74 | } | 
| borlanic | 0:380207fcb5c1 | 75 | #endif | 
| borlanic | 0:380207fcb5c1 | 76 | |
| borlanic | 0:380207fcb5c1 | 77 | #endif |