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: Nucleo_F103RB_RTC_battery_bkup_pwr_off_okay
Fork of mbed-dev by
targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/api/objects.h@177:619788de047e, 2017-11-07 (annotated)
- Committer:
- maxxir
- Date:
- Tue Nov 07 16:46:29 2017 +0000
- Revision:
- 177:619788de047e
- Parent:
- 167:e84263d55307
To fix broken RTC on Nucleo_F103RB / STM32F103 BluePill etc..; Used direct RTC register manipulation for STM32F1xx; rtc_read() && rtc_write() (native rtc_init() - works good); also added stub for non-working on STM32F1xx rtc_read_subseconds().
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 154:37f96f9d4de2 | 1 | /* mbed Microcontroller Library |
<> | 154:37f96f9d4de2 | 2 | * Copyright (c) 2006-2013 ARM Limited |
<> | 154:37f96f9d4de2 | 3 | * |
<> | 154:37f96f9d4de2 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
<> | 154:37f96f9d4de2 | 5 | * you may not use this file except in compliance with the License. |
<> | 154:37f96f9d4de2 | 6 | * You may obtain a copy of the License at |
<> | 154:37f96f9d4de2 | 7 | * |
<> | 154:37f96f9d4de2 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
<> | 154:37f96f9d4de2 | 9 | * |
<> | 154:37f96f9d4de2 | 10 | * Unless required by applicable law or agreed to in writing, software |
<> | 154:37f96f9d4de2 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
<> | 154:37f96f9d4de2 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<> | 154:37f96f9d4de2 | 13 | * See the License for the specific language governing permissions and |
<> | 154:37f96f9d4de2 | 14 | * limitations under the License. |
<> | 154:37f96f9d4de2 | 15 | */ |
<> | 154:37f96f9d4de2 | 16 | #ifndef MBED_OBJECTS_H |
<> | 154:37f96f9d4de2 | 17 | #define MBED_OBJECTS_H |
<> | 154:37f96f9d4de2 | 18 | |
<> | 154:37f96f9d4de2 | 19 | #include "cmsis.h" |
<> | 154:37f96f9d4de2 | 20 | #include "PortNames.h" |
<> | 154:37f96f9d4de2 | 21 | #include "PeripheralNames.h" |
<> | 154:37f96f9d4de2 | 22 | #include "PinNames.h" |
<> | 154:37f96f9d4de2 | 23 | #if DEVICE_SPI_ASYNCH |
<> | 154:37f96f9d4de2 | 24 | #include "fsl_dspi_edma.h" |
<> | 154:37f96f9d4de2 | 25 | #endif |
<> | 156:95d6b41a828b | 26 | #if DEVICE_SERIAL_ASYNCH |
<> | 156:95d6b41a828b | 27 | #include "fsl_uart_edma.h" |
<> | 156:95d6b41a828b | 28 | #endif |
AnnaBridge | 167:e84263d55307 | 29 | #include "fsl_flash.h" |
<> | 154:37f96f9d4de2 | 30 | #include "dma_api_hal.h" |
<> | 154:37f96f9d4de2 | 31 | |
<> | 154:37f96f9d4de2 | 32 | #ifdef __cplusplus |
<> | 154:37f96f9d4de2 | 33 | extern "C" { |
<> | 154:37f96f9d4de2 | 34 | #endif |
<> | 154:37f96f9d4de2 | 35 | |
<> | 154:37f96f9d4de2 | 36 | struct gpio_irq_s { |
<> | 154:37f96f9d4de2 | 37 | uint32_t port; |
<> | 154:37f96f9d4de2 | 38 | uint32_t pin; |
<> | 154:37f96f9d4de2 | 39 | uint32_t ch; |
<> | 154:37f96f9d4de2 | 40 | }; |
<> | 154:37f96f9d4de2 | 41 | |
<> | 154:37f96f9d4de2 | 42 | struct port_s { |
<> | 154:37f96f9d4de2 | 43 | PortName port; |
<> | 154:37f96f9d4de2 | 44 | uint32_t mask; |
<> | 154:37f96f9d4de2 | 45 | }; |
<> | 154:37f96f9d4de2 | 46 | |
<> | 154:37f96f9d4de2 | 47 | struct pwmout_s { |
<> | 154:37f96f9d4de2 | 48 | PWMName pwm_name; |
<> | 154:37f96f9d4de2 | 49 | }; |
<> | 154:37f96f9d4de2 | 50 | |
<> | 154:37f96f9d4de2 | 51 | struct serial_s { |
<> | 154:37f96f9d4de2 | 52 | int index; |
<> | 156:95d6b41a828b | 53 | #if DEVICE_SERIAL_ASYNCH |
<> | 156:95d6b41a828b | 54 | uint8_t txstate; |
<> | 156:95d6b41a828b | 55 | uint8_t rxstate; |
<> | 156:95d6b41a828b | 56 | uint32_t events; |
<> | 156:95d6b41a828b | 57 | uart_handle_t uart_transfer_handle; |
<> | 156:95d6b41a828b | 58 | uart_edma_handle_t uart_dma_handle; |
<> | 156:95d6b41a828b | 59 | dma_options_t uartDmaTx; |
<> | 156:95d6b41a828b | 60 | dma_options_t uartDmaRx; |
<> | 156:95d6b41a828b | 61 | #endif |
<> | 154:37f96f9d4de2 | 62 | }; |
<> | 154:37f96f9d4de2 | 63 | |
<> | 154:37f96f9d4de2 | 64 | struct analogin_s { |
<> | 154:37f96f9d4de2 | 65 | ADCName adc; |
<> | 154:37f96f9d4de2 | 66 | }; |
<> | 154:37f96f9d4de2 | 67 | |
<> | 154:37f96f9d4de2 | 68 | struct i2c_s { |
<> | 154:37f96f9d4de2 | 69 | uint32_t instance; |
<> | 154:37f96f9d4de2 | 70 | uint8_t next_repeated_start; |
<> | 154:37f96f9d4de2 | 71 | }; |
<> | 154:37f96f9d4de2 | 72 | |
<> | 154:37f96f9d4de2 | 73 | struct spi_s { |
<> | 154:37f96f9d4de2 | 74 | uint32_t instance; |
<> | 154:37f96f9d4de2 | 75 | uint8_t bits; |
<> | 154:37f96f9d4de2 | 76 | #if DEVICE_SPI_ASYNCH |
<> | 154:37f96f9d4de2 | 77 | status_t status; |
<> | 154:37f96f9d4de2 | 78 | dspi_master_handle_t spi_master_handle; |
<> | 154:37f96f9d4de2 | 79 | dspi_master_edma_handle_t spi_dma_master_handle; |
<> | 154:37f96f9d4de2 | 80 | dma_options_t spiDmaMasterRx; |
<> | 154:37f96f9d4de2 | 81 | dma_options_t spiDmaMasterTx; |
<> | 154:37f96f9d4de2 | 82 | dma_options_t spiDmaMasterIntermediary; |
<> | 154:37f96f9d4de2 | 83 | #endif |
<> | 154:37f96f9d4de2 | 84 | }; |
<> | 154:37f96f9d4de2 | 85 | |
<> | 154:37f96f9d4de2 | 86 | struct dac_s { |
<> | 154:37f96f9d4de2 | 87 | DACName dac; |
<> | 154:37f96f9d4de2 | 88 | }; |
<> | 154:37f96f9d4de2 | 89 | |
<> | 154:37f96f9d4de2 | 90 | struct trng_s { |
<> | 154:37f96f9d4de2 | 91 | uint8_t dummy; |
<> | 154:37f96f9d4de2 | 92 | }; |
<> | 154:37f96f9d4de2 | 93 | |
AnnaBridge | 167:e84263d55307 | 94 | struct flash_s { |
AnnaBridge | 167:e84263d55307 | 95 | flash_config_t flash_config; |
AnnaBridge | 167:e84263d55307 | 96 | }; |
AnnaBridge | 167:e84263d55307 | 97 | |
<> | 154:37f96f9d4de2 | 98 | #include "gpio_object.h" |
<> | 154:37f96f9d4de2 | 99 | |
<> | 154:37f96f9d4de2 | 100 | #ifdef __cplusplus |
<> | 154:37f96f9d4de2 | 101 | } |
<> | 154:37f96f9d4de2 | 102 | #endif |
<> | 154:37f96f9d4de2 | 103 | |
<> | 154:37f96f9d4de2 | 104 | #endif |