moved platform independent code to the right place
This commit is contained in:
parent
9952ee8f26
commit
e8a85b3726
|
@ -91,6 +91,12 @@ struct file_desc {
|
||||||
#define FD_WRITABLE(fd) (coffee_fd_set[(fd)].flags & CFS_WRITE)
|
#define FD_WRITABLE(fd) (coffee_fd_set[(fd)].flags & CFS_WRITE)
|
||||||
#define FD_APPENDABLE(fd) (coffee_fd_set[(fd)].flags & CFS_APPEND)
|
#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 {
|
struct dir_cache {
|
||||||
char filename_start;
|
char filename_start;
|
||||||
int32_t page;
|
int32_t page;
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#ifndef CFS_COFFEE_ARCH_H
|
|
||||||
#define CFS_COFFEE_ARCH_H
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, Swedish Institute of Computer Science
|
* Copyright (c) 2008, Swedish Institute of Computer Science
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -41,6 +38,9 @@
|
||||||
* Niclas Finne <nfi@sics.se>
|
* Niclas Finne <nfi@sics.se>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CFS_COFFEE_ARCH_H
|
||||||
|
#define CFS_COFFEE_ARCH_H
|
||||||
|
|
||||||
#include "contiki-conf.h"
|
#include "contiki-conf.h"
|
||||||
#include "dev/eeprom.h"
|
#include "dev/eeprom.h"
|
||||||
|
|
||||||
|
@ -66,12 +66,6 @@
|
||||||
|
|
||||||
#define COFFEE_ERASE(sector) cfs_coffee_arch_erase(sector)
|
#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);
|
void cfs_coffee_arch_erase(uint16_t sector);
|
||||||
|
|
||||||
#endif /* !COFFEE_ARCH_H */
|
#endif /* !COFFEE_ARCH_H */
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#ifndef CFS_COFFEE_ARCH_H
|
|
||||||
#define CFS_COFFEE_ARCH_H
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, Swedish Institute of Computer Science
|
* Copyright (c) 2008, Swedish Institute of Computer Science
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -40,6 +37,9 @@
|
||||||
* Nicolas Tsiftes <nvt@sics.se>
|
* Nicolas Tsiftes <nvt@sics.se>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CFS_COFFEE_ARCH_H
|
||||||
|
#define CFS_COFFEE_ARCH_H
|
||||||
|
|
||||||
#include "contiki-conf.h"
|
#include "contiki-conf.h"
|
||||||
#include "dev/xmem.h"
|
#include "dev/xmem.h"
|
||||||
|
|
||||||
|
@ -52,7 +52,6 @@
|
||||||
#define COFFEE_NAME_LENGTH 16
|
#define COFFEE_NAME_LENGTH 16
|
||||||
#define COFFEE_DYN_SIZE (16 kb)
|
#define COFFEE_DYN_SIZE (16 kb)
|
||||||
#define COFFEE_FD_SET_SIZE 8
|
#define COFFEE_FD_SET_SIZE 8
|
||||||
#define COFFEE_LOG_DIVISOR 4
|
|
||||||
#define COFFEE_LOG_SIZE (8 kb)
|
#define COFFEE_LOG_SIZE (8 kb)
|
||||||
#define COFFEE_LOG_TABLE_LIMIT 256
|
#define COFFEE_LOG_TABLE_LIMIT 256
|
||||||
#define COFFEE_DIR_CACHE_ENTRIES 16
|
#define COFFEE_DIR_CACHE_ENTRIES 16
|
||||||
|
@ -66,10 +65,4 @@
|
||||||
#define COFFEE_ERASE(sector) \
|
#define COFFEE_ERASE(sector) \
|
||||||
xmem_erase(COFFEE_SECTOR_SIZE, COFFEE_START + (sector) * COFFEE_SECTOR_SIZE)
|
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 */
|
#endif /* !COFFEE_ARCH_H */
|
||||||
|
|
Loading…
Reference in a new issue