TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle

Matrix keyboard for STM32F4xx device - http://stm32f4-discovery.com/2014/09/library-32-matrix-keypad-on-stm32f4xx. More...

Modules

 TM_KEYPAD_Macros
 Library defines.
 
 TM_KEYPAD_Typedefs
 Library Typedefs.
 
 TM_KEYPAD_Functions
 Library Functions.
 

Detailed Description

Matrix keyboard for STM32F4xx device - http://stm32f4-discovery.com/2014/09/library-32-matrix-keypad-on-stm32f4xx.

Library supports 2 versions of keypads:

Default pinout
Keypad      STM32F4xx       Description

C1          PD0             Column 1
C2          PD1             Column 2
C3          PD2             Column 3
C4          PD3             Column 4
R1          PC1             Row 1
R2          PC2             Row 2
R3          PC3             Row 3
R4          PC5             Row 4

You can change pinout. Open defines.h file and change lines below:

//Change rows pinout. Change X from 1 to 4, according to ROW you want to change
#define KEYPAD_ROW_X_PORT           GPIOC
#define KEYPAD_ROW_X_PIN            GPIO_PIN_0

//Change columns pinout. Change X from 1 to 4, according to COLUMN you want to change
#define KEYPAD_COLUMN_X_PORT        GPIOD
#define KEYPAD_COLUMN_X_PIN         GPIO_PIN_0

You can set this for all 4 columns and all 4 rows.

Changelog
 Version 2.0
  - April 11, 2015
  - Library rewritten, now with more accuracy and interrupt based
  
 Version 1.1
  - March 11, 2015
  - Added support for my new GPIO library
  
 Version 1.0
  - First release
Dependencies
 - STM32F4xx
 - STM32F4xx RCC
 - defines.h