The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_NUCLEO_F303ZE/TARGET_STM/TARGET_STM32F3/common_objects.h@128:9bcdf88f62b0, 2016-10-27 (annotated)
- Committer:
- <>
- Date:
- Thu Oct 27 16:45:56 2016 +0100
- Revision:
- 128:9bcdf88f62b0
- Parent:
- 126:abea610beb85
- Child:
- 132:9baf128c2fab
Release 128 of the mbed library
Ports for Upcoming Targets
Fixes and Changes
2966: Add kw24 support https://github.com/ARMmbed/mbed-os/pull/2966
3068: MultiTech mDot - clean up PeripheralPins.c and add new pin names https://github.com/ARMmbed/mbed-os/pull/3068
3089: Kinetis HAL: Remove clock initialization code from serial and ticker https://github.com/ARMmbed/mbed-os/pull/3089
2943: [NRF5] NVIC_SetVector functionality https://github.com/ARMmbed/mbed-os/pull/2943
2938: InterruptIn changes in NCS36510 HAL. https://github.com/ARMmbed/mbed-os/pull/2938
3108: Fix sleep function for NRF52. https://github.com/ARMmbed/mbed-os/pull/3108
3076: STM32F1: Correct timer master value reading https://github.com/ARMmbed/mbed-os/pull/3076
3085: Add LOWPOWERTIMER capability for NUCLEO_F303ZE https://github.com/ARMmbed/mbed-os/pull/3085
3046: [BEETLE] Update BLE stack on Beetle board https://github.com/ARMmbed/mbed-os/pull/3046
3122: [Silicon Labs] Update of Silicon Labs HAL https://github.com/ARMmbed/mbed-os/pull/3122
3022: OnSemi RAM usage fix https://github.com/ARMmbed/mbed-os/pull/3022
3121: STM32F3: Correct UART4 and UART5 defines when using DEVICE_SERIAL_ASYNCH https://github.com/ARMmbed/mbed-os/pull/3121
3142: Targets- NUMAKER_PFM_NUC47216 remove mbed 2 https://github.com/ARMmbed/mbed-os/pull/3142
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 126:abea610beb85 | 1 | /* mbed Microcontroller Library |
AnnaBridge | 126:abea610beb85 | 2 | ******************************************************************************* |
AnnaBridge | 126:abea610beb85 | 3 | * Copyright (c) 2016, STMicroelectronics |
AnnaBridge | 126:abea610beb85 | 4 | * All rights reserved. |
AnnaBridge | 126:abea610beb85 | 5 | * |
AnnaBridge | 126:abea610beb85 | 6 | * Redistribution and use in source and binary forms, with or without |
AnnaBridge | 126:abea610beb85 | 7 | * modification, are permitted provided that the following conditions are met: |
AnnaBridge | 126:abea610beb85 | 8 | * |
AnnaBridge | 126:abea610beb85 | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
AnnaBridge | 126:abea610beb85 | 10 | * this list of conditions and the following disclaimer. |
AnnaBridge | 126:abea610beb85 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
AnnaBridge | 126:abea610beb85 | 12 | * this list of conditions and the following disclaimer in the documentation |
AnnaBridge | 126:abea610beb85 | 13 | * and/or other materials provided with the distribution. |
AnnaBridge | 126:abea610beb85 | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
AnnaBridge | 126:abea610beb85 | 15 | * may be used to endorse or promote products derived from this software |
AnnaBridge | 126:abea610beb85 | 16 | * without specific prior written permission. |
AnnaBridge | 126:abea610beb85 | 17 | * |
AnnaBridge | 126:abea610beb85 | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
AnnaBridge | 126:abea610beb85 | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
AnnaBridge | 126:abea610beb85 | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
AnnaBridge | 126:abea610beb85 | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
AnnaBridge | 126:abea610beb85 | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
AnnaBridge | 126:abea610beb85 | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
AnnaBridge | 126:abea610beb85 | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
AnnaBridge | 126:abea610beb85 | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
AnnaBridge | 126:abea610beb85 | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
AnnaBridge | 126:abea610beb85 | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
AnnaBridge | 126:abea610beb85 | 28 | ******************************************************************************* |
AnnaBridge | 126:abea610beb85 | 29 | */ |
AnnaBridge | 126:abea610beb85 | 30 | #ifndef MBED_COMMON_OBJECTS_H |
AnnaBridge | 126:abea610beb85 | 31 | #define MBED_COMMON_OBJECTS_H |
AnnaBridge | 126:abea610beb85 | 32 | |
AnnaBridge | 126:abea610beb85 | 33 | #include "cmsis.h" |
AnnaBridge | 126:abea610beb85 | 34 | #include "PortNames.h" |
AnnaBridge | 126:abea610beb85 | 35 | #include "PeripheralNames.h" |
AnnaBridge | 126:abea610beb85 | 36 | #include "PinNames.h" |
AnnaBridge | 126:abea610beb85 | 37 | |
AnnaBridge | 126:abea610beb85 | 38 | #ifdef __cplusplus |
AnnaBridge | 126:abea610beb85 | 39 | extern "C" { |
AnnaBridge | 126:abea610beb85 | 40 | #endif |
AnnaBridge | 126:abea610beb85 | 41 | |
AnnaBridge | 126:abea610beb85 | 42 | struct pwmout_s { |
AnnaBridge | 126:abea610beb85 | 43 | PWMName pwm; |
AnnaBridge | 126:abea610beb85 | 44 | PinName pin; |
AnnaBridge | 126:abea610beb85 | 45 | uint32_t prescaler; |
AnnaBridge | 126:abea610beb85 | 46 | uint32_t period; |
AnnaBridge | 126:abea610beb85 | 47 | uint32_t pulse; |
AnnaBridge | 126:abea610beb85 | 48 | uint8_t channel; |
AnnaBridge | 126:abea610beb85 | 49 | uint8_t inverted; |
AnnaBridge | 126:abea610beb85 | 50 | }; |
AnnaBridge | 126:abea610beb85 | 51 | |
<> | 128:9bcdf88f62b0 | 52 | struct spi_s { |
<> | 128:9bcdf88f62b0 | 53 | SPI_HandleTypeDef handle; |
<> | 128:9bcdf88f62b0 | 54 | IRQn_Type spiIRQ; |
<> | 128:9bcdf88f62b0 | 55 | SPIName spi; |
<> | 128:9bcdf88f62b0 | 56 | PinName pin_miso; |
<> | 128:9bcdf88f62b0 | 57 | PinName pin_mosi; |
<> | 128:9bcdf88f62b0 | 58 | PinName pin_sclk; |
<> | 128:9bcdf88f62b0 | 59 | PinName pin_ssel; |
<> | 128:9bcdf88f62b0 | 60 | #ifdef DEVICE_SPI_ASYNCH |
<> | 128:9bcdf88f62b0 | 61 | uint32_t event; |
<> | 128:9bcdf88f62b0 | 62 | uint8_t module; |
<> | 128:9bcdf88f62b0 | 63 | uint8_t transfer_type; |
<> | 128:9bcdf88f62b0 | 64 | #endif |
<> | 128:9bcdf88f62b0 | 65 | }; |
<> | 128:9bcdf88f62b0 | 66 | |
AnnaBridge | 126:abea610beb85 | 67 | struct serial_s { |
AnnaBridge | 126:abea610beb85 | 68 | UARTName uart; |
AnnaBridge | 126:abea610beb85 | 69 | int index; // Used by irq |
AnnaBridge | 126:abea610beb85 | 70 | uint32_t baudrate; |
AnnaBridge | 126:abea610beb85 | 71 | uint32_t databits; |
AnnaBridge | 126:abea610beb85 | 72 | uint32_t stopbits; |
AnnaBridge | 126:abea610beb85 | 73 | uint32_t parity; |
AnnaBridge | 126:abea610beb85 | 74 | PinName pin_tx; |
AnnaBridge | 126:abea610beb85 | 75 | PinName pin_rx; |
AnnaBridge | 126:abea610beb85 | 76 | #if DEVICE_SERIAL_ASYNCH |
AnnaBridge | 126:abea610beb85 | 77 | uint32_t events; |
AnnaBridge | 126:abea610beb85 | 78 | #endif |
AnnaBridge | 126:abea610beb85 | 79 | #if DEVICE_SERIAL_FC |
AnnaBridge | 126:abea610beb85 | 80 | uint32_t hw_flow_ctl; |
AnnaBridge | 126:abea610beb85 | 81 | PinName pin_rts; |
AnnaBridge | 126:abea610beb85 | 82 | PinName pin_cts; |
AnnaBridge | 126:abea610beb85 | 83 | #endif |
AnnaBridge | 126:abea610beb85 | 84 | }; |
AnnaBridge | 126:abea610beb85 | 85 | |
AnnaBridge | 126:abea610beb85 | 86 | #include "gpio_object.h" |
AnnaBridge | 126:abea610beb85 | 87 | |
AnnaBridge | 126:abea610beb85 | 88 | #ifdef __cplusplus |
AnnaBridge | 126:abea610beb85 | 89 | } |
AnnaBridge | 126:abea610beb85 | 90 | #endif |
AnnaBridge | 126:abea610beb85 | 91 | |
AnnaBridge | 126:abea610beb85 | 92 | #endif |
AnnaBridge | 126:abea610beb85 | 93 |