BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
8734dcd
Branches
Tags
master
flaneth
firmware
app_bbm.h
resend MCUF frame after 1s when playing BBM
Stefan Schuermans
commited
8734dcd
at 2012-05-06 18:37:54
app_bbm.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_app_bbm #define INC_app_bbm #include "dosfs.h" /// internal state of BBM play application typedef struct app_bbm_state { // initialize before calling init uint8_t (*sectorBuf)[SECTOR_SIZE]; ///< scratch buffer to store a sector VOLINFO *vi; ///< volume information structure uint8_t no; ///< number of BBM play application // internal stuff char isInit; ///< if successfully initialized unsigned long nextActMs; ///< when to do next action char haveAddr; ///< if destination address for MCUF is known unsigned char addr[4]; ///< destination address for MCUF packets unsigned short port; ///< destination port for MCUF packets unsigned int idxFile; ///< index of file to open next char haveFile; ///< if a file is open FILEINFO fi; ///< information about open file uint16_t height; ///< height of current movie uint16_t width; ///< width of current movie uint16_t channels; ///< channels in current movie uint16_t maxval; ///< maxval of current movie uint16_t dataSz; ///< size of data in a frame uint16_t thisFrameMs; /**< time the current frame has already been shown when next action triggers */ } AppBbmState; /** * @brief initialize BBM play application * @param[in,out] state internal state of application * * state.sectorBuf, state.vi, state.no have to be initialized before calling */ extern void AppBbmInit(AppBbmState *state); /** * @brief run BBM play application * @param[in,out] state internal state of application */ extern void AppBbmRun(AppBbmState *state); #endif // #ifndef INC_app_bbm