libnile
Loading...
Searching...
No Matches
nilefs.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <wonderful.h>
#include <ws/cart/rtc.h>
#include "nilefs/ff.h"
#include "nilefs/diskio.h"

Go to the source code of this file.

Macros

#define NILEFS_CARD_CID_SIZE   16

Functions

void nilefs_eject (void)
 Eject the currently inserted TF card.
bool nilefs_read_card_cid (void __far *buff)
 Read the TF card's CID.
uint32_t nilefs_read_card_sector_count (void)
 Read the TF card's size, in 512-byte sectors.
uint32_t nilefs_convert_rtc_datetime_to_fat (ws_cart_rtc_datetime_t *datetime)
 Convert an RTC timestamp to a FAT timestamp.

Detailed Description

The nilefs library provides FAT filesystem access to the removable storage card provided by nileswan.

More information is available in the FatFs documentation, which this library is based on: http://elm-chan.org/fsw/ff/

Definition in file nilefs.h.

Macro Definition Documentation

◆ NILEFS_CARD_CID_SIZE

#define NILEFS_CARD_CID_SIZE   16

Definition at line 48 of file nilefs.h.

Function Documentation

◆ nilefs_convert_rtc_datetime_to_fat()

uint32_t nilefs_convert_rtc_datetime_to_fat ( ws_cart_rtc_datetime_t * datetime)

Convert an RTC timestamp to a FAT timestamp.

Parameters
datetimeRTC timestamp.
Returns
uint32_t FAT timestamp.

◆ nilefs_eject()

void nilefs_eject ( void )

Eject the currently inserted TF card.

◆ nilefs_read_card_cid()

bool nilefs_read_card_cid ( void __far * buff)

Read the TF card's CID.

Parameters
buffPointer to 16-byte memory region.

◆ nilefs_read_card_sector_count()

uint32_t nilefs_read_card_sector_count ( void )

Read the TF card's size, in 512-byte sectors.

Returns
uint32_t Sector count, or 0 on failure.