takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FlashSimBlockDevice_stub.cpp Source File

FlashSimBlockDevice_stub.cpp

00001 /*
00002  * Copyright (c) , Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #include "FlashSimBlockDevice.h"
00019 #include "mbed_assert.h"
00020 #include "mbed_critical.h"
00021 #include <algorithm>
00022 #include <stdlib.h>
00023 #include <string.h>
00024 
00025 static const bd_size_t min_blank_buf_size = 32;
00026 
00027 static inline uint32_t align_up(bd_size_t val, bd_size_t size)
00028 {
00029     return (((val - 1) / size) + 1) * size;
00030 }
00031 
00032 FlashSimBlockDevice::FlashSimBlockDevice(BlockDevice *bd, uint8_t erase_value)
00033 {
00034 }
00035 
00036 FlashSimBlockDevice::~FlashSimBlockDevice()
00037 {
00038 }
00039 
00040 int FlashSimBlockDevice::init()
00041 {
00042     return 0;
00043 }
00044 
00045 int FlashSimBlockDevice::deinit()
00046 {
00047     return 0;
00048 }
00049 
00050 int FlashSimBlockDevice::sync()
00051 {
00052     return 0;
00053 }
00054 
00055 bd_size_t FlashSimBlockDevice::get_read_size() const
00056 {
00057     return 0;
00058 }
00059 
00060 bd_size_t FlashSimBlockDevice::get_program_size() const
00061 {
00062     return 0;
00063 }
00064 
00065 bd_size_t FlashSimBlockDevice::get_erase_size() const
00066 {
00067     return 0;
00068 }
00069 
00070 bd_size_t FlashSimBlockDevice::get_erase_size(bd_addr_t addr) const
00071 {
00072     return 0;
00073 }
00074 
00075 bd_size_t FlashSimBlockDevice::size() const
00076 {
00077     return 0;
00078 }
00079 
00080 int FlashSimBlockDevice::read(void *b, bd_addr_t addr, bd_size_t size)
00081 {
00082     return 0;
00083 }
00084 
00085 int FlashSimBlockDevice::program(const void *b, bd_addr_t addr, bd_size_t size)
00086 {
00087     return 0;
00088 }
00089 
00090 int FlashSimBlockDevice::erase(bd_addr_t addr, bd_size_t size)
00091 {
00092     return 0;
00093 }
00094 
00095 int FlashSimBlockDevice::get_erase_value() const
00096 {
00097     return 0;
00098 }