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.
Dependents: MAX34417_demo MAXREFDES1265 MAXREFDES1265
Fork of mbed-dev by
targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F334x8/objects.h@164:2e7515f8c45d, 2017-03-24 (annotated)
- Committer:
- switches
- Date:
- Fri Mar 24 15:15:13 2017 +0000
- Revision:
- 164:2e7515f8c45d
- Parent:
- 158:b23ee177fd68
Added low level init to clear IO registers
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| Kojto | 158:b23ee177fd68 | 1 | /* mbed Microcontroller Library | 
| Kojto | 158:b23ee177fd68 | 2 | ******************************************************************************* | 
| Kojto | 158:b23ee177fd68 | 3 | * Copyright (c) 2015, STMicroelectronics | 
| Kojto | 158:b23ee177fd68 | 4 | * All rights reserved. | 
| Kojto | 158:b23ee177fd68 | 5 | * | 
| Kojto | 158:b23ee177fd68 | 6 | * Redistribution and use in source and binary forms, with or without | 
| Kojto | 158:b23ee177fd68 | 7 | * modification, are permitted provided that the following conditions are met: | 
| Kojto | 158:b23ee177fd68 | 8 | * | 
| Kojto | 158:b23ee177fd68 | 9 | * 1. Redistributions of source code must retain the above copyright notice, | 
| Kojto | 158:b23ee177fd68 | 10 | * this list of conditions and the following disclaimer. | 
| Kojto | 158:b23ee177fd68 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, | 
| Kojto | 158:b23ee177fd68 | 12 | * this list of conditions and the following disclaimer in the documentation | 
| Kojto | 158:b23ee177fd68 | 13 | * and/or other materials provided with the distribution. | 
| Kojto | 158:b23ee177fd68 | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors | 
| Kojto | 158:b23ee177fd68 | 15 | * may be used to endorse or promote products derived from this software | 
| Kojto | 158:b23ee177fd68 | 16 | * without specific prior written permission. | 
| Kojto | 158:b23ee177fd68 | 17 | * | 
| Kojto | 158:b23ee177fd68 | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 
| Kojto | 158:b23ee177fd68 | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 
| Kojto | 158:b23ee177fd68 | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 
| Kojto | 158:b23ee177fd68 | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | 
| Kojto | 158:b23ee177fd68 | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 
| Kojto | 158:b23ee177fd68 | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 
| Kojto | 158:b23ee177fd68 | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | 
| Kojto | 158:b23ee177fd68 | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | 
| Kojto | 158:b23ee177fd68 | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 
| Kojto | 158:b23ee177fd68 | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
| Kojto | 158:b23ee177fd68 | 28 | ******************************************************************************* | 
| Kojto | 158:b23ee177fd68 | 29 | */ | 
| Kojto | 158:b23ee177fd68 | 30 | #ifndef MBED_OBJECTS_H | 
| Kojto | 158:b23ee177fd68 | 31 | #define MBED_OBJECTS_H | 
| Kojto | 158:b23ee177fd68 | 32 | |
| Kojto | 158:b23ee177fd68 | 33 | #include "cmsis.h" | 
| Kojto | 158:b23ee177fd68 | 34 | #include "PortNames.h" | 
| Kojto | 158:b23ee177fd68 | 35 | #include "PeripheralNames.h" | 
| Kojto | 158:b23ee177fd68 | 36 | #include "PinNames.h" | 
| Kojto | 158:b23ee177fd68 | 37 | |
| Kojto | 158:b23ee177fd68 | 38 | #ifdef __cplusplus | 
| Kojto | 158:b23ee177fd68 | 39 | extern "C" { | 
| Kojto | 158:b23ee177fd68 | 40 | #endif | 
| Kojto | 158:b23ee177fd68 | 41 | |
| Kojto | 158:b23ee177fd68 | 42 | struct gpio_irq_s { | 
| Kojto | 158:b23ee177fd68 | 43 | IRQn_Type irq_n; | 
| Kojto | 158:b23ee177fd68 | 44 | uint32_t irq_index; | 
| Kojto | 158:b23ee177fd68 | 45 | uint32_t event; | 
| Kojto | 158:b23ee177fd68 | 46 | PinName pin; | 
| Kojto | 158:b23ee177fd68 | 47 | }; | 
| Kojto | 158:b23ee177fd68 | 48 | |
| Kojto | 158:b23ee177fd68 | 49 | struct port_s { | 
| Kojto | 158:b23ee177fd68 | 50 | PortName port; | 
| Kojto | 158:b23ee177fd68 | 51 | uint32_t mask; | 
| Kojto | 158:b23ee177fd68 | 52 | PinDirection direction; | 
| Kojto | 158:b23ee177fd68 | 53 | __IO uint32_t *reg_in; | 
| Kojto | 158:b23ee177fd68 | 54 | __IO uint32_t *reg_out; | 
| Kojto | 158:b23ee177fd68 | 55 | }; | 
| Kojto | 158:b23ee177fd68 | 56 | |
| Kojto | 158:b23ee177fd68 | 57 | struct analogin_s { | 
| Kojto | 158:b23ee177fd68 | 58 | ADCName adc; | 
| Kojto | 158:b23ee177fd68 | 59 | PinName pin; | 
| Kojto | 158:b23ee177fd68 | 60 | uint32_t channel; | 
| Kojto | 158:b23ee177fd68 | 61 | }; | 
| Kojto | 158:b23ee177fd68 | 62 | |
| Kojto | 158:b23ee177fd68 | 63 | struct dac_s { | 
| Kojto | 158:b23ee177fd68 | 64 | DACName dac; | 
| Kojto | 158:b23ee177fd68 | 65 | PinName pin; | 
| Kojto | 158:b23ee177fd68 | 66 | uint32_t channel; | 
| Kojto | 158:b23ee177fd68 | 67 | }; | 
| Kojto | 158:b23ee177fd68 | 68 | |
| Kojto | 158:b23ee177fd68 | 69 | #if defined (DEVICE_CAN) | 
| Kojto | 158:b23ee177fd68 | 70 | struct can_s { | 
| Kojto | 158:b23ee177fd68 | 71 | CANName can; | 
| Kojto | 158:b23ee177fd68 | 72 | int index; | 
| Kojto | 158:b23ee177fd68 | 73 | }; | 
| Kojto | 158:b23ee177fd68 | 74 | #endif | 
| Kojto | 158:b23ee177fd68 | 75 | |
| Kojto | 158:b23ee177fd68 | 76 | #include "common_objects.h" | 
| Kojto | 158:b23ee177fd68 | 77 | |
| Kojto | 158:b23ee177fd68 | 78 | #ifdef __cplusplus | 
| Kojto | 158:b23ee177fd68 | 79 | } | 
| Kojto | 158:b23ee177fd68 | 80 | #endif | 
| Kojto | 158:b23ee177fd68 | 81 | |
| Kojto | 158:b23ee177fd68 | 82 | #endif | 
