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.

Committer:
<>
Date:
Tue Mar 14 16:20:51 2017 +0000
Revision:
138:093f2bd7b9eb
Child:
165:d1b4690b3f8b
Release 138 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3716: fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files https://github.com/ARMmbed/mbed-os/pull/3716
3741: STM32 remove warning in hal_tick_32b.c file https://github.com/ARMmbed/mbed-os/pull/3741
3780: STM32L4 : Fix GPIO G port compatibility https://github.com/ARMmbed/mbed-os/pull/3780
3831: NCS36510: SPISLAVE enabled (Conflict resolved) https://github.com/ARMmbed/mbed-os/pull/3831
3836: Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os https://github.com/ARMmbed/mbed-os/pull/3836
3840: STM32: gpio SPEED - always set High Speed by default https://github.com/ARMmbed/mbed-os/pull/3840
3844: STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR) https://github.com/ARMmbed/mbed-os/pull/3844
3850: STM32: change spi error to debug warning https://github.com/ARMmbed/mbed-os/pull/3850
3860: Define GPIO_IP_WITHOUT_BRR for xDot platform https://github.com/ARMmbed/mbed-os/pull/3860
3880: DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated https://github.com/ARMmbed/mbed-os/pull/3880
3795: Fix pwm period calc https://github.com/ARMmbed/mbed-os/pull/3795
3828: STM32 CAN API: correct format and type https://github.com/ARMmbed/mbed-os/pull/3828
3842: TARGET_NRF: corrected spi_init() to properly handle re-initialization https://github.com/ARMmbed/mbed-os/pull/3842
3843: STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) https://github.com/ARMmbed/mbed-os/pull/3843
3879: NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10. https://github.com/ARMmbed/mbed-os/pull/3879
3902: Fix heap and stack size for NUCLEO_F746ZG https://github.com/ARMmbed/mbed-os/pull/3902
3829: can_write(): return error code when no tx mailboxes are available https://github.com/ARMmbed/mbed-os/pull/3829

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 138:093f2bd7b9eb 1 /* mbed Microcontroller Library
<> 138:093f2bd7b9eb 2 * Copyright (c) 2017 ARM Limited
<> 138:093f2bd7b9eb 3 *
<> 138:093f2bd7b9eb 4 * Licensed under the Apache License, Version 2.0 (the "License");
<> 138:093f2bd7b9eb 5 * you may not use this file except in compliance with the License.
<> 138:093f2bd7b9eb 6 * You may obtain a copy of the License at
<> 138:093f2bd7b9eb 7 *
<> 138:093f2bd7b9eb 8 * http://www.apache.org/licenses/LICENSE-2.0
<> 138:093f2bd7b9eb 9 *
<> 138:093f2bd7b9eb 10 * Unless required by applicable law or agreed to in writing, software
<> 138:093f2bd7b9eb 11 * distributed under the License is distributed on an "AS IS" BASIS,
<> 138:093f2bd7b9eb 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<> 138:093f2bd7b9eb 13 * See the License for the specific language governing permissions and
<> 138:093f2bd7b9eb 14 * limitations under the License.
<> 138:093f2bd7b9eb 15 */
<> 138:093f2bd7b9eb 16 #ifndef MBED_FLASH_DATA_H
<> 138:093f2bd7b9eb 17 #define MBED_FLASH_DATA_H
<> 138:093f2bd7b9eb 18
<> 138:093f2bd7b9eb 19 #include <stdint.h>
<> 138:093f2bd7b9eb 20
<> 138:093f2bd7b9eb 21 // Target flash algorithm structure
<> 138:093f2bd7b9eb 22 typedef struct {
<> 138:093f2bd7b9eb 23 const uint32_t init;
<> 138:093f2bd7b9eb 24 const uint32_t uninit;
<> 138:093f2bd7b9eb 25 const uint32_t erase_sector;
<> 138:093f2bd7b9eb 26 const uint32_t program_page;
<> 138:093f2bd7b9eb 27 const uint32_t static_base;
<> 138:093f2bd7b9eb 28 uint32_t *algo_blob;
<> 138:093f2bd7b9eb 29 } flash_algo_t;
<> 138:093f2bd7b9eb 30
<> 138:093f2bd7b9eb 31 typedef struct {
<> 138:093f2bd7b9eb 32 const uint32_t start;
<> 138:093f2bd7b9eb 33 const uint32_t size;
<> 138:093f2bd7b9eb 34 } sector_info_t;
<> 138:093f2bd7b9eb 35
<> 138:093f2bd7b9eb 36 typedef struct {
<> 138:093f2bd7b9eb 37 const uint32_t page_size;
<> 138:093f2bd7b9eb 38 const uint32_t flash_start;
<> 138:093f2bd7b9eb 39 const uint32_t flash_size;
<> 138:093f2bd7b9eb 40 const sector_info_t *sectors;
<> 138:093f2bd7b9eb 41 const uint32_t sector_info_count;
<> 138:093f2bd7b9eb 42 } flash_target_config_t;
<> 138:093f2bd7b9eb 43
<> 138:093f2bd7b9eb 44 // Target flash configuration
<> 138:093f2bd7b9eb 45 struct flash_s {
<> 138:093f2bd7b9eb 46 const flash_target_config_t *target_config;
<> 138:093f2bd7b9eb 47 const flash_algo_t *flash_algo;
<> 138:093f2bd7b9eb 48 };
<> 138:093f2bd7b9eb 49
<> 138:093f2bd7b9eb 50 typedef struct {
<> 138:093f2bd7b9eb 51 uint32_t r0;
<> 138:093f2bd7b9eb 52 uint32_t r1;
<> 138:093f2bd7b9eb 53 uint32_t r2;
<> 138:093f2bd7b9eb 54 uint32_t r3;
<> 138:093f2bd7b9eb 55 uint32_t r9;
<> 138:093f2bd7b9eb 56 uint32_t pc;
<> 138:093f2bd7b9eb 57 } args_t;
<> 138:093f2bd7b9eb 58
<> 138:093f2bd7b9eb 59 typedef int32_t (*flash_algo_jump_t)(args_t*);
<> 138:093f2bd7b9eb 60
<> 138:093f2bd7b9eb 61 // prototypes for flash algo CMSIS API
<> 138:093f2bd7b9eb 62
<> 138:093f2bd7b9eb 63 typedef int (*CMSIS_Algo_Function_Init)(unsigned long adr, unsigned long clk, unsigned long fnc);
<> 138:093f2bd7b9eb 64 typedef int (*CMSIS_Algo_Function_UnInit)(unsigned long fnc);
<> 138:093f2bd7b9eb 65 typedef int (*CMSIS_Algo_Function_EraseSector)(unsigned long adr);
<> 138:093f2bd7b9eb 66 typedef int (*CMSIS_Algo_Function_EraseChip)(void);
<> 138:093f2bd7b9eb 67 typedef int (*CMSIS_Algo_Function_ProgramPage)(unsigned long adr, unsigned long sz, unsigned char *buf);
<> 138:093f2bd7b9eb 68 typedef unsigned long (*CMSIS_Algo_Function_Verify)(unsigned long adr, unsigned long sz, unsigned char *buf);
<> 138:093f2bd7b9eb 69
<> 138:093f2bd7b9eb 70 #ifdef __cplusplus
<> 138:093f2bd7b9eb 71 extern "C" {
<> 138:093f2bd7b9eb 72 #endif
<> 138:093f2bd7b9eb 73
<> 138:093f2bd7b9eb 74 /* Set target configuration
<> 138:093f2bd7b9eb 75 */
<> 138:093f2bd7b9eb 76 void flash_set_target_config(flash_t *obj);
<> 138:093f2bd7b9eb 77
<> 138:093f2bd7b9eb 78 #ifdef __cplusplus
<> 138:093f2bd7b9eb 79 };
<> 138:093f2bd7b9eb 80 #endif
<> 138:093f2bd7b9eb 81
<> 138:093f2bd7b9eb 82
<> 138:093f2bd7b9eb 83 #endif