moved platform independent code to the right place

This commit is contained in:
nvt-se 2008-07-11 21:35:10 +00:00
parent 9952ee8f26
commit e8a85b3726
3 changed files with 12 additions and 19 deletions

View file

@ -91,6 +91,12 @@ struct file_desc {
#define FD_WRITABLE(fd) (coffee_fd_set[(fd)].flags & CFS_WRITE)
#define FD_APPENDABLE(fd) (coffee_fd_set[(fd)].flags & CFS_APPEND)
#define READ_HEADER(hdr, page) \
COFFEE_READ((hdr), sizeof (*hdr), (page) * COFFEE_PAGE_SIZE)
#define WRITE_HEADER(hdr, page) \
COFFEE_WRITE((hdr), sizeof (*hdr), (page) * COFFEE_PAGE_SIZE)
struct dir_cache {
char filename_start;
int32_t page;

View file

@ -1,6 +1,3 @@
#ifndef CFS_COFFEE_ARCH_H
#define CFS_COFFEE_ARCH_H
/*
* Copyright (c) 2008, Swedish Institute of Computer Science
* All rights reserved.
@ -41,6 +38,9 @@
* Niclas Finne <nfi@sics.se>
*/
#ifndef CFS_COFFEE_ARCH_H
#define CFS_COFFEE_ARCH_H
#include "contiki-conf.h"
#include "dev/eeprom.h"
@ -66,12 +66,6 @@
#define COFFEE_ERASE(sector) cfs_coffee_arch_erase(sector)
#define READ_HEADER(hdr, page) \
COFFEE_READ((hdr), sizeof (*hdr), (page) * COFFEE_PAGE_SIZE)
#define WRITE_HEADER(hdr, page) \
COFFEE_WRITE((hdr), sizeof (*hdr), (page) * COFFEE_PAGE_SIZE)
void cfs_coffee_arch_erase(uint16_t sector);
#endif /* !COFFEE_ARCH_H */

View file

@ -1,6 +1,3 @@
#ifndef CFS_COFFEE_ARCH_H
#define CFS_COFFEE_ARCH_H
/*
* Copyright (c) 2008, Swedish Institute of Computer Science
* All rights reserved.
@ -40,6 +37,9 @@
* Nicolas Tsiftes <nvt@sics.se>
*/
#ifndef CFS_COFFEE_ARCH_H
#define CFS_COFFEE_ARCH_H
#include "contiki-conf.h"
#include "dev/xmem.h"
@ -52,7 +52,6 @@
#define COFFEE_NAME_LENGTH 16
#define COFFEE_DYN_SIZE (16 kb)
#define COFFEE_FD_SET_SIZE 8
#define COFFEE_LOG_DIVISOR 4
#define COFFEE_LOG_SIZE (8 kb)
#define COFFEE_LOG_TABLE_LIMIT 256
#define COFFEE_DIR_CACHE_ENTRIES 16
@ -66,10 +65,4 @@
#define COFFEE_ERASE(sector) \
xmem_erase(COFFEE_SECTOR_SIZE, COFFEE_START + (sector) * COFFEE_SECTOR_SIZE)
#define READ_HEADER(hdr, page) \
COFFEE_READ((hdr), sizeof (*hdr), (page) * COFFEE_PAGE_SIZE)
#define WRITE_HEADER(hdr, page) \
COFFEE_WRITE((hdr), sizeof (*hdr), (page) * COFFEE_PAGE_SIZE)
#endif /* !COFFEE_ARCH_H */