Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_NUCLEO_L053R8/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L053R8/objects.h@96:487b796308b0, 2015-03-17 (annotated)
- Committer:
- Kojto
- Date:
- Tue Mar 17 14:27:45 2015 +0000
- Revision:
- 96:487b796308b0
- Child:
- 99:dbbf35b96557
Release 96 of the mbed library
Changes:
- IAR support for ble boards, lpc, ethernet stack
- RTC - attach function to redirect time functions
- Nucleo F103RB - cube driver
- k20xx - fixes for teensy and k20 platforms in sleep/deepsleep and usb
- STM32L0, Nucleo/Disco L053 - refactoring
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 96:487b796308b0 | 1 | /* mbed Microcontroller Library |
Kojto | 96:487b796308b0 | 2 | ******************************************************************************* |
Kojto | 96:487b796308b0 | 3 | * Copyright (c) 2014, STMicroelectronics |
Kojto | 96:487b796308b0 | 4 | * All rights reserved. |
Kojto | 96:487b796308b0 | 5 | * |
Kojto | 96:487b796308b0 | 6 | * Redistribution and use in source and binary forms, with or without |
Kojto | 96:487b796308b0 | 7 | * modification, are permitted provided that the following conditions are met: |
Kojto | 96:487b796308b0 | 8 | * |
Kojto | 96:487b796308b0 | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 96:487b796308b0 | 10 | * this list of conditions and the following disclaimer. |
Kojto | 96:487b796308b0 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 96:487b796308b0 | 12 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 96:487b796308b0 | 13 | * and/or other materials provided with the distribution. |
Kojto | 96:487b796308b0 | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 96:487b796308b0 | 15 | * may be used to endorse or promote products derived from this software |
Kojto | 96:487b796308b0 | 16 | * without specific prior written permission. |
Kojto | 96:487b796308b0 | 17 | * |
Kojto | 96:487b796308b0 | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 96:487b796308b0 | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 96:487b796308b0 | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 96:487b796308b0 | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 96:487b796308b0 | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 96:487b796308b0 | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 96:487b796308b0 | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 96:487b796308b0 | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 96:487b796308b0 | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 96:487b796308b0 | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 96:487b796308b0 | 28 | ******************************************************************************* |
Kojto | 96:487b796308b0 | 29 | */ |
Kojto | 96:487b796308b0 | 30 | #ifndef MBED_OBJECTS_H |
Kojto | 96:487b796308b0 | 31 | #define MBED_OBJECTS_H |
Kojto | 96:487b796308b0 | 32 | |
Kojto | 96:487b796308b0 | 33 | #include "cmsis.h" |
Kojto | 96:487b796308b0 | 34 | #include "PortNames.h" |
Kojto | 96:487b796308b0 | 35 | #include "PeripheralNames.h" |
Kojto | 96:487b796308b0 | 36 | #include "PinNames.h" |
Kojto | 96:487b796308b0 | 37 | |
Kojto | 96:487b796308b0 | 38 | #ifdef __cplusplus |
Kojto | 96:487b796308b0 | 39 | extern "C" { |
Kojto | 96:487b796308b0 | 40 | #endif |
Kojto | 96:487b796308b0 | 41 | |
Kojto | 96:487b796308b0 | 42 | struct gpio_irq_s { |
Kojto | 96:487b796308b0 | 43 | IRQn_Type irq_n; |
Kojto | 96:487b796308b0 | 44 | uint32_t irq_index; |
Kojto | 96:487b796308b0 | 45 | uint32_t event; |
Kojto | 96:487b796308b0 | 46 | PinName pin; |
Kojto | 96:487b796308b0 | 47 | }; |
Kojto | 96:487b796308b0 | 48 | |
Kojto | 96:487b796308b0 | 49 | struct port_s { |
Kojto | 96:487b796308b0 | 50 | PortName port; |
Kojto | 96:487b796308b0 | 51 | uint32_t mask; |
Kojto | 96:487b796308b0 | 52 | PinDirection direction; |
Kojto | 96:487b796308b0 | 53 | __IO uint32_t *reg_in; |
Kojto | 96:487b796308b0 | 54 | __IO uint32_t *reg_out; |
Kojto | 96:487b796308b0 | 55 | }; |
Kojto | 96:487b796308b0 | 56 | |
Kojto | 96:487b796308b0 | 57 | struct analogin_s { |
Kojto | 96:487b796308b0 | 58 | ADCName adc; |
Kojto | 96:487b796308b0 | 59 | PinName pin; |
Kojto | 96:487b796308b0 | 60 | }; |
Kojto | 96:487b796308b0 | 61 | |
Kojto | 96:487b796308b0 | 62 | struct dac_s { |
Kojto | 96:487b796308b0 | 63 | DACName dac; |
Kojto | 96:487b796308b0 | 64 | PinName pin; |
Kojto | 96:487b796308b0 | 65 | }; |
Kojto | 96:487b796308b0 | 66 | |
Kojto | 96:487b796308b0 | 67 | struct serial_s { |
Kojto | 96:487b796308b0 | 68 | UARTName uart; |
Kojto | 96:487b796308b0 | 69 | int index; // Used by irq |
Kojto | 96:487b796308b0 | 70 | uint32_t baudrate; |
Kojto | 96:487b796308b0 | 71 | uint32_t databits; |
Kojto | 96:487b796308b0 | 72 | uint32_t stopbits; |
Kojto | 96:487b796308b0 | 73 | uint32_t parity; |
Kojto | 96:487b796308b0 | 74 | PinName pin_tx; |
Kojto | 96:487b796308b0 | 75 | PinName pin_rx; |
Kojto | 96:487b796308b0 | 76 | }; |
Kojto | 96:487b796308b0 | 77 | |
Kojto | 96:487b796308b0 | 78 | struct spi_s { |
Kojto | 96:487b796308b0 | 79 | SPIName spi; |
Kojto | 96:487b796308b0 | 80 | uint32_t bits; |
Kojto | 96:487b796308b0 | 81 | uint32_t cpol; |
Kojto | 96:487b796308b0 | 82 | uint32_t cpha; |
Kojto | 96:487b796308b0 | 83 | uint32_t mode; |
Kojto | 96:487b796308b0 | 84 | uint32_t nss; |
Kojto | 96:487b796308b0 | 85 | uint32_t br_presc; |
Kojto | 96:487b796308b0 | 86 | PinName pin_miso; |
Kojto | 96:487b796308b0 | 87 | PinName pin_mosi; |
Kojto | 96:487b796308b0 | 88 | PinName pin_sclk; |
Kojto | 96:487b796308b0 | 89 | PinName pin_ssel; |
Kojto | 96:487b796308b0 | 90 | }; |
Kojto | 96:487b796308b0 | 91 | |
Kojto | 96:487b796308b0 | 92 | struct i2c_s { |
Kojto | 96:487b796308b0 | 93 | I2CName i2c; |
Kojto | 96:487b796308b0 | 94 | }; |
Kojto | 96:487b796308b0 | 95 | |
Kojto | 96:487b796308b0 | 96 | struct pwmout_s { |
Kojto | 96:487b796308b0 | 97 | PWMName pwm; |
Kojto | 96:487b796308b0 | 98 | PinName pin; |
Kojto | 96:487b796308b0 | 99 | uint32_t period; |
Kojto | 96:487b796308b0 | 100 | uint32_t pulse; |
Kojto | 96:487b796308b0 | 101 | }; |
Kojto | 96:487b796308b0 | 102 | |
Kojto | 96:487b796308b0 | 103 | #include "gpio_object.h" |
Kojto | 96:487b796308b0 | 104 | |
Kojto | 96:487b796308b0 | 105 | #ifdef __cplusplus |
Kojto | 96:487b796308b0 | 106 | } |
Kojto | 96:487b796308b0 | 107 | #endif |
Kojto | 96:487b796308b0 | 108 | |
Kojto | 96:487b796308b0 | 109 | #endif |