From 216d20dabbc1007911ef83905b523d8f537c70e5 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Tue, 1 Jan 2008 17:44:24 +0000 Subject: [PATCH] Allow to implement cfs API on preprocessor level using a "pfs" (platform file system) by setting a new high-level config macro. --- cpu/6502/6502def.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cpu/6502/6502def.h b/cpu/6502/6502def.h index a42f561ad..db3ce9b77 100644 --- a/cpu/6502/6502def.h +++ b/cpu/6502/6502def.h @@ -30,7 +30,7 @@ * * Author: Oliver Schmidt * - * @(#)$Id: 6502def.h,v 1.7 2007/12/23 15:29:19 oliverschmidt Exp $ + * @(#)$Id: 6502def.h,v 1.8 2008/01/01 17:44:24 oliverschmidt Exp $ */ #ifndef __6502DEF_H__ @@ -106,12 +106,18 @@ typedef unsigned short uip_stats_t; #define ctk_arch_getkey cgetc #define ctk_arch_isprint isprint +#if WITH_PFS +#define cfs_open pfs_open +#define cfs_close pfs_close +#define cfs_read pfs_read +#define cfs_write pfs_write +#else /* WITH_PFS */ #define CFS_READ (O_RDONLY) #define CFS_WRITE (O_CREAT | O_TRUNC | O_RDWR) - #define cfs_open open #define cfs_close close #define cfs_read read #define cfs_write write +#endif /* WITH_PFS */ #endif /* __6502DEF_H__ */