Simone: a game of visual memory and speed
stm32f4_keyboard_hw_t Struct Reference

Structure to define the HW dependencies of a keyboard status. More...

#include <stm32f4_keyboard.h>

Data Fields

const keyboard_tp_keyboard
 
GPIO_TypeDef ** p_row_ports
 
uint8_t * p_row_pins
 
GPIO_TypeDef ** p_col_ports
 
uint8_t * p_col_pins
 
bool flag_key_pressed
 
bool flag_row_timeout
 
uint8_t col_idx_interrupt
 
uint8_t current_excited_row
 

Detailed Description

Structure to define the HW dependencies of a keyboard status.

Because the rows and columns GPIO ports and pins are variable-length arrays depending on the keyboard layout, double pointers are used to define GPIOs (because GPIOs are defined as pointers of GPIO_TypeDef type) and pointers are used to define the arrays of rows and columns.

Field Documentation

◆ col_idx_interrupt

uint8_t stm32f4_keyboard_hw_t::col_idx_interrupt

Index of the column that provoked an interrupt

◆ current_excited_row

uint8_t stm32f4_keyboard_hw_t::current_excited_row

Current row being excited

◆ flag_key_pressed

bool stm32f4_keyboard_hw_t::flag_key_pressed

Flag to indicate that a key has been pressed

◆ flag_row_timeout

bool stm32f4_keyboard_hw_t::flag_row_timeout

Flag to indicate that the column scanning timeout has occurred

◆ p_col_pins

uint8_t* stm32f4_keyboard_hw_t::p_col_pins

Pointer to an array of pins/lines where the keyboard columns are connected

◆ p_col_ports

GPIO_TypeDef** stm32f4_keyboard_hw_t::p_col_ports

Pointer to an array of GPIO ports where the keyboard columns are connected

◆ p_keyboard

const keyboard_t* stm32f4_keyboard_hw_t::p_keyboard

Pointer to the keyboard structure

◆ p_row_pins

uint8_t* stm32f4_keyboard_hw_t::p_row_pins

Pointer to an array of pins/lines where the keyboard rows are connected

◆ p_row_ports

GPIO_TypeDef** stm32f4_keyboard_hw_t::p_row_ports

Pointer to an array of GPIO ports where the keyboard rows are connected


The documentation for this struct was generated from the following file: