// ----------------------------------------------------------------------------- /// @file keypadMatrix.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) 2017 Micro-Key bv // ----------------------------------------------------------------------------- /// @defgroup {group_name} {group_description} /// Description /// @file keypadMatrix.h /// @ingroup {group_name} #ifndef KEYPAD_INC_KEYPADMATRIX_H_ #define KEYPAD_INC_KEYPADMATRIX_H_ // ----------------------------------------------------------------------------- // Include files // ----------------------------------------------------------------------------- #include "platform.h" #include "stm32f10x_exti.h" // ----------------------------------------------------------------------------- // Constant and macro definitions // ----------------------------------------------------------------------------- #define KEYPAD_NUMBER_OF_ROWS (4) #define KEYPAD_NUMBER_OF_COLUMNS (4) // ----------------------------------------------------------------------------- // Type definitions. // ----------------------------------------------------------------------------- struct keypadElement { T_PL_GPIO gpio; EXTI_InitTypeDef EXTI_InitStruct; }; struct Keypad { struct keypadElement row[KEYPAD_NUMBER_OF_ROWS]; struct keypadElement column[KEYPAD_NUMBER_OF_COLUMNS]; }; // ----------------------------------------------------------------------------- // Function declarations // ----------------------------------------------------------------------------- /** ---------------------------------------------------------------------------- * Keypad_construct * contructor for the Keypad driver * * @return ErrorStatus SUCCESS if initialisation was successful * ERROR otherwise * * @todo * ----------------------------------------------------------------------------- */ extern ErrorStatus Keypad_construct(void); extern ErrorStatus Keypad_logModuleInfo(void); #endif /* KEYPAD_INC_KEYPADMATRIX_H_ */