Semihosted file handles for targets without DEVICE_SEMIHOST or DEVICE_LOCALFILESYSTEM
Embed:
(wiki syntax)
Show/hide line numbers
mbed_semihost_api_shim.h
00001 00002 /** \addtogroup platform */ 00003 /** @{*/ 00004 /* mbed Microcontroller Library 00005 * Copyright (c) 2006-2013 ARM Limited 00006 * 00007 * Licensed under the Apache License, Version 2.0 (the "License"); 00008 * you may not use this file except in compliance with the License. 00009 * You may obtain a copy of the License at 00010 * 00011 * http://www.apache.org/licenses/LICENSE-2.0 00012 * 00013 * Unless required by applicable law or agreed to in writing, software 00014 * distributed under the License is distributed on an "AS IS" BASIS, 00015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00016 * See the License for the specific language governing permissions and 00017 * limitations under the License. 00018 */ 00019 #ifndef MBED_SEMIHOST_SHIM_H 00020 #define MBED_SEMIHOST_SHIM_H 00021 00022 #include "device.h" 00023 #include "platform/mbed_toolchain.h" 00024 00025 #include "platform/mbed_semihost_api.h" 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00031 #if !DEVICE_LOCALFILESYSTEM 00032 FILEHANDLE semihost_open(const char* name, int openmode); 00033 int semihost_close (FILEHANDLE fh); 00034 int semihost_read (FILEHANDLE fh, unsigned char* buffer, unsigned int length, int mode); 00035 int semihost_write (FILEHANDLE fh, const unsigned char* buffer, unsigned int length, int mode); 00036 int semihost_ensure(FILEHANDLE fh); 00037 long semihost_flen (FILEHANDLE fh); 00038 int semihost_seek (FILEHANDLE fh, long position); 00039 int semihost_istty (FILEHANDLE fh); 00040 00041 int semihost_remove(const char *name); 00042 int semihost_rename(const char *old_name, const char *new_name); 00043 #endif 00044 00045 #ifdef __cplusplus 00046 } 00047 #endif 00048 00049 #endif 00050 00051 /** @}*/
Generated on Thu Jul 14 2022 18:48:16 by
1.7.2