BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
2342395
Branches
Tags
master
flaneth
firmware
dosfs_user.c
change email address in header to blinkenarea address
Stefan Schuermans
commited
2342395
at 2012-05-22 19:18:57
dosfs_user.c
Blame
History
Raw
/* flaneth - flash and ethernet Copyright (C) 2007-2012 Stefan Schuermans <stefan@blinkenarea.org> Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html a BlinkenArea project - http://www.blinkenarea.org/ */ #include "cf.h" #include "dosfs.h" /** * @brief read sector(s) from disk * @param[in] unit identifies the disk * @param[in] buffer to put data into * @param[in] sector number of sector * @param[in] count number of sectors to read * @return 0 on success, -1 on error */ uint32_t DFS_ReadSector(uint8_t unit, uint8_t *buffer, uint32_t sector, uint32_t count) { // read sectros from CF card for ( ; count > 0; count--, buffer += SECTOR_SIZE) if (CfRead(sector, buffer) != 0) return -1; return 0; (void)unit; } /** * @brief write sector(s) to disk * @param[in] unit identifies the disk * @param[in] buffer to get data from * @param[in] sector number of sector * @param[in] count number of sectors to write * @return 0 on success, -1 on error */ uint32_t DFS_WriteSector(uint8_t unit, uint8_t *buffer, uint32_t sector, uint32_t count) { // writing not supported return -1; (void)unit; (void)buffer; (void)sector; (void)count; }