3 Copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __SEMIHOST_PRIVATE_H__
16 #define __SEMIHOST_PRIVATE_H__
22 } SEMIHOST_FILE_OPEN_BLOCK
;
28 } SEMIHOST_FILE_READ_WRITE_BLOCK
;
33 } SEMIHOST_FILE_SEEK_BLOCK
;
38 } SEMIHOST_FILE_REMOVE_BLOCK
;
43 } SEMIHOST_SYSTEM_BLOCK
;
47 #if defined(__thumb__)
53 #define SEMIHOST_SUPPORTED TRUE
59 IN SEMIHOST_FILE_OPEN_BLOCK
*OpenBlock
87 IN OUT SEMIHOST_FILE_READ_WRITE_BLOCK
*WriteBlock
94 IN OUT SEMIHOST_FILE_READ_WRITE_BLOCK
*ReadBlock
108 IN SEMIHOST_FILE_SEEK_BLOCK
*SeekBlock
120 _Semihost_SYS_REMOVE(
122 IN SEMIHOST_FILE_REMOVE_BLOCK
*RemoveBlock
127 _Semihost_SYS_SYSTEM(
129 IN SEMIHOST_SYSTEM_BLOCK
*SystemBlock
132 #define Semihost_SYS_OPEN(OpenBlock) _Semihost_SYS_OPEN(0x01, OpenBlock)
133 #define Semihost_SYS_CLOSE(Handle) _Semihost_SYS_CLOSE(0x02, Handle)
134 #define Semihost_SYS_WRITE0(String) _Semihost_SYS_WRITE0(0x04, String)
135 #define Semihost_SYS_WRITEC(Character) _Semihost_SYS_WRITEC(0x03, Character)
136 #define Semihost_SYS_WRITE(WriteBlock) _Semihost_SYS_WRITE(0x05, WriteBlock)
137 #define Semihost_SYS_READ(ReadBlock) _Semihost_SYS_READ(0x06, ReadBlock)
138 #define Semihost_SYS_READC() _Semihost_SYS_READC(0x07, 0)
139 #define Semihost_SYS_SEEK(SeekBlock) _Semihost_SYS_SEEK(0x0A, SeekBlock)
140 #define Semihost_SYS_FLEN(Handle) _Semihost_SYS_FLEN(0x0C, Handle)
141 #define Semihost_SYS_REMOVE(RemoveBlock) _Semihost_SYS_REMOVE(0x0E, RemoveBlock)
142 #define Semihost_SYS_SYSTEM(SystemBlock) _Semihost_SYS_SYSTEM(0x12, SystemBlock)
146 #define SEMIHOST_SUPPORTED FALSE
148 #define Semihost_SYS_OPEN(OpenBlock) (-1)
149 #define Semihost_SYS_CLOSE(Handle) (-1)
150 #define Semihost_SYS_WRITE0(String)
151 #define Semihost_SYS_WRITEC(Character)
152 #define Semihost_SYS_WRITE(WriteBlock) (0)
153 #define Semihost_SYS_READ(ReadBlock) ((ReadBlock)->Length)
154 #define Semihost_SYS_READC() ('x')
155 #define Semihost_SYS_SEEK(SeekBlock) (-1)
156 #define Semihost_SYS_FLEN(Handle) (-1)
157 #define Semihost_SYS_REMOVE(RemoveBlock) (-1)
158 #define Semihost_SYS_SYSTEM(SystemBlock) (-1)
162 #endif //__SEMIHOST_PRIVATE_H__