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: KL46Z-lpc81isp lpcterm2
DiskInterface.h
00001 // DiskInterface.h 2013/9/21 00002 #pragma once 00003 00004 class DiskInterface { 00005 public: 00006 /* 00007 * read a block on a storage chip 00008 * 00009 * @param data pointer where will be stored read data 00010 * @param block block number 00011 * @returns 0 if successful 00012 */ 00013 virtual int disk_read(uint8_t * data, uint64_t block) = 0; 00014 00015 /* 00016 * write a block on a storage chip 00017 * 00018 * @param data data to write 00019 * @param block block number 00020 * @returns 0 if successful 00021 */ 00022 virtual int disk_write(const uint8_t * data, uint64_t block) = 0; 00023 00024 /* 00025 * Disk initilization 00026 */ 00027 virtual int disk_initialize() = 0; 00028 00029 /* 00030 * Return the number of blocks 00031 * 00032 * @returns number of blocks 00033 */ 00034 virtual uint64_t disk_sectors() = 0; 00035 00036 /* 00037 * Return memory size 00038 * 00039 * @returns memory size 00040 */ 00041 virtual uint64_t disk_size() = 0; 00042 00043 /* 00044 * To check the status of the storage chip 00045 * 00046 * @returns status: 0: OK, 1: disk not initialized, 2: no medium in the drive, 4: write protected 00047 */ 00048 virtual int disk_status() = 0; 00049 };
Generated on Tue Jul 12 2022 19:39:32 by
1.7.2