mbed library sources. Supersedes mbed-src.

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

Committer:
AnnaBridge
Date:
Wed Feb 20 22:31:08 2019 +0000
Revision:
189:f392fc9709a3
Parent:
169:e3b6fe271b81
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 169:e3b6fe271b81 1 /* mbed Microcontroller Library
Kojto 169:e3b6fe271b81 2 * Copyright (c) 2017 ARM Limited
AnnaBridge 189:f392fc9709a3 3 * SPDX-License-Identifier: Apache-2.0
Kojto 169:e3b6fe271b81 4 *
Kojto 169:e3b6fe271b81 5 * Licensed under the Apache License, Version 2.0 (the "License");
Kojto 169:e3b6fe271b81 6 * you may not use this file except in compliance with the License.
Kojto 169:e3b6fe271b81 7 * You may obtain a copy of the License at
Kojto 169:e3b6fe271b81 8 *
Kojto 169:e3b6fe271b81 9 * http://www.apache.org/licenses/LICENSE-2.0
Kojto 169:e3b6fe271b81 10 *
Kojto 169:e3b6fe271b81 11 * Unless required by applicable law or agreed to in writing, software
Kojto 169:e3b6fe271b81 12 * distributed under the License is distributed on an "AS IS" BASIS,
Kojto 169:e3b6fe271b81 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Kojto 169:e3b6fe271b81 14 * See the License for the specific language governing permissions and
Kojto 169:e3b6fe271b81 15 * limitations under the License.
Kojto 169:e3b6fe271b81 16 */
Kojto 169:e3b6fe271b81 17
Kojto 169:e3b6fe271b81 18 #include "hal/flash_api.h"
Kojto 169:e3b6fe271b81 19
Kojto 169:e3b6fe271b81 20 #if DEVICE_FLASH
Kojto 169:e3b6fe271b81 21
Kojto 169:e3b6fe271b81 22 #include "platform/mbed_toolchain.h"
Kojto 169:e3b6fe271b81 23 #include <string.h>
Kojto 169:e3b6fe271b81 24
Kojto 169:e3b6fe271b81 25 MBED_WEAK int32_t flash_read(flash_t *obj, uint32_t address, uint8_t *data, uint32_t size)
Kojto 169:e3b6fe271b81 26 {
Kojto 169:e3b6fe271b81 27 memcpy(data, (const void *)address, size);
Kojto 169:e3b6fe271b81 28 return 0;
Kojto 169:e3b6fe271b81 29 }
Kojto 169:e3b6fe271b81 30
Kojto 169:e3b6fe271b81 31 #endif