|
Contiki 3.x
|
Module for the cc2538 Coffee port. More...
Files | |
| file | cfs-coffee-arch.c |
| Module for the cc2538 Coffee port. | |
| file | cfs-coffee-arch.h |
| Header file for the cc2538 Coffee port module. | |
Coffee port constants | |
| #define | COFFEE_SECTOR_SIZE FLASH_PAGE_SIZE |
| Logical sector size. | |
| #define | COFFEE_PAGE_SIZE (COFFEE_SECTOR_SIZE / 8) |
| Logical page size. | |
| #define | COFFEE_START CC2538_DEV_FLASH_ADDR |
| Start offset of the file system. | |
| #define | COFFEE_SIZE 0 |
| Total size in bytes of the file system. | |
| #define | COFFEE_NAME_LENGTH 40 |
| Maximal filename length. | |
| #define | COFFEE_MAX_OPEN_FILES 5 |
| Number of file cache entries. | |
| #define | COFFEE_FD_SET_SIZE 5 |
| Number of file descriptor entries. | |
| #define | COFFEE_LOG_TABLE_LIMIT 16 |
| Maximal amount of log table entries read in one batch. | |
| #define | COFFEE_DYN_SIZE (COFFEE_SECTOR_SIZE - 50) |
| Default reserved file size. | |
| #define | COFFEE_LOG_SIZE (4 * COFFEE_PAGE_SIZE) |
| Default micro-log size. | |
| #define | COFFEE_MICRO_LOGS 0 |
| Whether Coffee will use micro logs. | |
| #define | COFFEE_APPEND_ONLY 1 |
| Whether files are expected to be appended to only. | |
Coffee port macros | |
| #define | COFFEE_ERASE(sector) cfs_coffee_arch_erase(sector) |
| Erase. | |
| #define | COFFEE_WRITE(buf, size, offset) cfs_coffee_arch_write((buf), (size), (offset)) |
| Write. | |
| #define | COFFEE_READ(buf, size, offset) cfs_coffee_arch_read((buf), (size), (offset)) |
| Read. | |
Coffee port types | |
| typedef int16_t | coffee_page_t |
| Page. | |
Coffee port functions | |
| void | cfs_coffee_arch_erase (uint16_t sector) |
| Erases a device sector. More... | |
| void | cfs_coffee_arch_write (const void *buf, unsigned int size, cfs_offset_t offset) |
| Writes a buffer to the device. More... | |
| void | cfs_coffee_arch_read (void *buf, unsigned int size, cfs_offset_t offset) |
| Reads from the device to a buffer. More... | |
Module for the cc2538 Coffee port.
| void cfs_coffee_arch_erase | ( | uint16_t | sector | ) |
Erases a device sector.
| sector | Sector to erase |
Definition at line 76 of file cfs-coffee-arch.c.
References COFFEE_SECTOR_SIZE, COFFEE_START, INTERRUPTS_DISABLE, INTERRUPTS_ENABLE, and watchdog_periodic().
| void cfs_coffee_arch_read | ( | void * | buf, |
| unsigned int | size, | ||
| cfs_offset_t | offset | ||
| ) |
Reads from the device to a buffer.
| buf | Pointer to the buffer |
| size | Byte size of the buffer |
| offset | Device offset to read from |
Definition at line 131 of file cfs-coffee-arch.c.
References COFFEE_START, and watchdog_periodic().
| void cfs_coffee_arch_write | ( | const void * | buf, |
| unsigned int | size, | ||
| cfs_offset_t | offset | ||
| ) |
Writes a buffer to the device.
| buf | Pointer to the buffer |
| size | Byte size of the buffer |
| offset | Device offset to write to |
Definition at line 86 of file cfs-coffee-arch.c.
References COFFEE_PAGE_SIZE, COFFEE_START, INTERRUPTS_DISABLE, INTERRUPTS_ENABLE, and watchdog_periodic().
1.8.6