// ----------------------------------------------------------------------------- /// @file DisplayContent.h /// @brief File description // ----------------------------------------------------------------------------- // Micro-Key bv // Industrieweg 28, 9804 TG Noordhorn // Postbus 92, 9800 AB Zuidhorn // The Netherlands // Tel: +31 594 503020 // Fax: +31 594 505825 // Email: support@microkey.nl // Web: www.microkey.nl // ----------------------------------------------------------------------------- /// $Revision$ /// $Author$ /// $Date$ // (c) 2015 Micro-Key bv // ----------------------------------------------------------------------------- /** * DisplayContent implementation * \defgroup DisplayContent Package DisplayContent * \ingroup hsb-mrts * @{ */ #ifndef DISPLAYCONTENT_H_ #define DISPLAYCONTENT_H_ // ----------------------------------------------------------------------------- // Include files // ----------------------------------------------------------------------------- #include #include "FreeRTOS.h" #include "semphr.h" #include "stm32f10x.h" // ----------------------------------------------------------------------------- // Constant and macro definitions // ----------------------------------------------------------------------------- #define DISPLAY_MAX_ROWS (6) #define DISPLAY_MAX_COLUMNS (25) // ----------------------------------------------------------------------------- // Type definitions. // ----------------------------------------------------------------------------- struct DisplayCharacter { char character; bool isUpdated; }; struct DisplayContent { bool initialized; SemaphoreHandle_t contentAccess; size_t numberOfRows; size_t numberOfColumns; struct DisplayCharacter DisplayContent[DISPLAY_MAX_ROWS][DISPLAY_MAX_COLUMNS]; }; // ----------------------------------------------------------------------------- // Function declarations // ----------------------------------------------------------------------------- /** ---------------------------------------------------------------------------- * DisplayContent_construct * Description of function * * @param self * @param numberOfRows * @param numberOfColumns * @return ErrorStatus * * @todo * ----------------------------------------------------------------------------- */ extern ErrorStatus DisplayContent_construct(struct DisplayContent* self, size_t numberOfRows, size_t numberOfColumns); /** ---------------------------------------------------------------------------- * DisplayContent_destruct * Description of function * * @param self * @param * @return void * * @todo * ----------------------------------------------------------------------------- */ extern void DisplayContent_destruct(struct DisplayContent* self); /** ---------------------------------------------------------------------------- * DisplayContent_updateCharacter * Description of function * * @param self * @param row * @param column * @param character * * @return void * * @todo * ----------------------------------------------------------------------------- */ extern void DisplayContent_updateCharacter(struct DisplayContent* self, unsigned int row, unsigned int column, char character); /** ---------------------------------------------------------------------------- * DisplayContent_isCharacterUpdated * Description of function * * @param self * @param row * @param column * * @return bool * * @todo * ----------------------------------------------------------------------------- */ extern bool DisplayContent_isCharacterUpdated(struct DisplayContent* self, unsigned int row, unsigned int column); /** ---------------------------------------------------------------------------- * DisplayContent_getCharacter * Description of function * * @param self * @param row * @param column * * @return char * * @todo * ----------------------------------------------------------------------------- */ extern char DisplayContent_getCharacter(struct DisplayContent* self, unsigned int row, unsigned int column); /** ---------------------------------------------------------------------------- * DisplayContent_refresh * Description of function * * @param self * @param * @return void * * @todo * ----------------------------------------------------------------------------- */ extern void DisplayContent_refresh(struct DisplayContent* self); /** ---------------------------------------------------------------------------- * DisplayContent_clear * Description of function * * @param self * * @return return_type * * @todo * ----------------------------------------------------------------------------- */ extern void DisplayContent_clear(struct DisplayContent* self); #endif /* DISPLAYCONTENT_H_ */ /** @} */