BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
1385d21
Branches
Tags
master
flaneth
firmware
cf.h
converted CF processing to run in foreground implemented CF sector read
Stefan Schuermans
commited
1385d21
at 2012-05-02 20:53:14
cf.h
Blame
History
Raw
/* flaneth - flash and ethernet Copyright (C) 2007-2012 Stefan Schuermans <stefan@schuermans.info> Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html a BlinkenArea project - http://www.blinkenarea.org/ */ #ifndef INC_cf #define INC_cf // size of a sector in bytes #define CF_SECTOR_SIZE (512) // initialize extern void CfInit(void); // tick procedure - call every 20ms extern void CfTick20(void); /** * @brief check if CF card is present * @return 1 if CF card is present, 0 if not */ extern char CfIsPresent(void); /** * @brief reset CF card * @return 0 if CF card could be reset, -1 if not */ extern char CfReset(void); /** * @brief identify CF card * @param[out] sectors number of sectors on CF card * @return 0 if CF card could be identified, -1 if not */ extern char CfIdentify(unsigned long *sectors); /** * @brief read from CF card * @param[in] sector number of sector to read * @param[out] data data read from sector * @return 0 if sector could be read, -1 if not */ extern char CfRead(unsigned long sector, unsigned char data[CF_SECTOR_SIZE]); #endif // #ifndef INC_cf