mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
<>
Date:
Tue Mar 14 16:40:56 2017 +0000
Revision:
160:d5399cc887bb
Child:
167:e84263d55307
This updates the lib to the mbed lib v138

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 160:d5399cc887bb 1 /* mbed Microcontroller Library
<> 160:d5399cc887bb 2 * Copyright (c) 2017 ARM Limited
<> 160:d5399cc887bb 3 *
<> 160:d5399cc887bb 4 * Licensed under the Apache License, Version 2.0 (the "License");
<> 160:d5399cc887bb 5 * you may not use this file except in compliance with the License.
<> 160:d5399cc887bb 6 * You may obtain a copy of the License at
<> 160:d5399cc887bb 7 *
<> 160:d5399cc887bb 8 * http://www.apache.org/licenses/LICENSE-2.0
<> 160:d5399cc887bb 9 *
<> 160:d5399cc887bb 10 * Unless required by applicable law or agreed to in writing, software
<> 160:d5399cc887bb 11 * distributed under the License is distributed on an "AS IS" BASIS,
<> 160:d5399cc887bb 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<> 160:d5399cc887bb 13 * See the License for the specific language governing permissions and
<> 160:d5399cc887bb 14 * limitations under the License.
<> 160:d5399cc887bb 15 */
<> 160:d5399cc887bb 16
<> 160:d5399cc887bb 17 #include "flash_api.h"
<> 160:d5399cc887bb 18 #include "flash_data.h"
<> 160:d5399cc887bb 19 #include "mbed_critical.h"
<> 160:d5399cc887bb 20
<> 160:d5399cc887bb 21 // This file is automagically generated
<> 160:d5399cc887bb 22
<> 160:d5399cc887bb 23 // This is a flash algo binary blob. It is PIC (position independent code) that should be stored in RAM
<> 160:d5399cc887bb 24 static uint32_t FLASH_ALGO[] = {
<> 160:d5399cc887bb 25 0xf3c04601, 0x28203007, 0x2204bf24, 0x1050eb02, 0x2810d205, 0x2203bf26, 0x1010eb02, 0xf4110880,
<> 160:d5399cc887bb 26 0xbf181f80, 0x0010f040, 0x48714770, 0x6001496f, 0x60014970, 0x68014870, 0x01f0f041, 0x486f6001,
<> 160:d5399cc887bb 27 0xf0106800, 0xd1080f20, 0xf245486d, 0x60015155, 0x60412106, 0x71fff640, 0x20006081, 0x49694770,
<> 160:d5399cc887bb 28 0xf4206808, 0x600a52f8, 0x48676008, 0xf0416801, 0x60014100, 0x47702000, 0xc18cf8df, 0x0000f8dc,
<> 160:d5399cc887bb 29 0x0004f040, 0x0000f8cc, 0x0000f8dc, 0x4000f440, 0x0000f8cc, 0x0000f8dc, 0x3080f440, 0x0000f8cc,
<> 160:d5399cc887bb 30 0x0004f1ac, 0xf4116801, 0xbf1c3f80, 0x21aaf64a, 0xd0044a53, 0x68036011, 0x3f80f413, 0xf8dcd1fa,
<> 160:d5399cc887bb 31 0xf0200000, 0xf8cc0004, 0xf8dc0000, 0xf4200000, 0xf8cc4000, 0x20000000, 0xf3c04770, 0x29203107,
<> 160:d5399cc887bb 32 0x2204bf24, 0x1151eb02, 0x2910d205, 0x2203bf26, 0x1111eb02, 0xf4100889, 0xbf181f80, 0x0110f041,
<> 160:d5399cc887bb 33 0x6802483d, 0x02f0f042, 0xf1006002, 0x22020c04, 0x2000f8cc, 0x2000f8dc, 0xea0323f8, 0x431101c1,
<> 160:d5399cc887bb 34 0x1000f8cc, 0x1000f8dc, 0x3180f441, 0x1000f8cc, 0xf4116801, 0xbf1c3f80, 0x21aaf64a, 0xd0044a30,
<> 160:d5399cc887bb 35 0x68036011, 0x3f80f413, 0xf8dcd1fa, 0xf0211000, 0xf8cc0102, 0x68011000, 0x0ff0f011, 0x2000bf04,
<> 160:d5399cc887bb 36 0x68014770, 0x01f0f041, 0x20016001, 0x4b224770, 0x1cc9b430, 0xc000f8d3, 0x0103f031, 0x0cf0f04c,
<> 160:d5399cc887bb 37 0xc000f8c3, 0x0404f103, 0x0c00f04f, 0xc000f8c4, 0xf240bf18, 0xd0252501, 0xc000f8d4, 0x0c05ea4c,
<> 160:d5399cc887bb 38 0xc000f8c4, 0xc000f8d2, 0xc000f8c0, 0xc000f8d3, 0x3f80f41c, 0xf8d4d1fa, 0xf02cc000, 0xf8c40c01,
<> 160:d5399cc887bb 39 0xf8d3c000, 0xf01cc000, 0xd0060ff0, 0xf0406818, 0x601800f0, 0x2001bc30, 0x1d004770, 0xf1021f09,
<> 160:d5399cc887bb 40 0xd1d90204, 0x2000bc30, 0x00004770, 0x45670123, 0x40023c04, 0xcdef89ab, 0x40023c0c, 0x40023c14,
<> 160:d5399cc887bb 41 0x40003000, 0x40023c00, 0x40023c10, 0x00000000
<> 160:d5399cc887bb 42 };
<> 160:d5399cc887bb 43
<> 160:d5399cc887bb 44 static const flash_algo_t flash_algo_config = {
<> 160:d5399cc887bb 45 .init = 0x2b,
<> 160:d5399cc887bb 46 .uninit = 0x5f,
<> 160:d5399cc887bb 47 .erase_sector = 0xdb,
<> 160:d5399cc887bb 48 .program_page = 0x16f,
<> 160:d5399cc887bb 49 .static_base = 0x20c,
<> 160:d5399cc887bb 50 .algo_blob = FLASH_ALGO
<> 160:d5399cc887bb 51 };
<> 160:d5399cc887bb 52
<> 160:d5399cc887bb 53 static const sector_info_t sectors_info[] = {
<> 160:d5399cc887bb 54 {0x8000000, 0x4000},
<> 160:d5399cc887bb 55 {0x8010000, 0x10000},
<> 160:d5399cc887bb 56 {0x8020000, 0x20000},
<> 160:d5399cc887bb 57 {0x8100000, 0x4000},
<> 160:d5399cc887bb 58 {0x8110000, 0x10000},
<> 160:d5399cc887bb 59 {0x8120000, 0x20000},
<> 160:d5399cc887bb 60 };
<> 160:d5399cc887bb 61
<> 160:d5399cc887bb 62 static const flash_target_config_t flash_target_config = {
<> 160:d5399cc887bb 63 .page_size = 0x400,
<> 160:d5399cc887bb 64 .flash_start = 0x8000000,
<> 160:d5399cc887bb 65 .flash_size = 0x200000,
<> 160:d5399cc887bb 66 .sectors = sectors_info,
<> 160:d5399cc887bb 67 .sector_info_count = sizeof(sectors_info) / sizeof(sector_info_t)
<> 160:d5399cc887bb 68 };
<> 160:d5399cc887bb 69
<> 160:d5399cc887bb 70 void flash_set_target_config(flash_t *obj)
<> 160:d5399cc887bb 71 {
<> 160:d5399cc887bb 72 obj->flash_algo = &flash_algo_config;
<> 160:d5399cc887bb 73 obj->target_config = &flash_target_config;
<> 160:d5399cc887bb 74 }