#include "stm32f4xx.h"
// Define LED matrix pins #define ROW_1 GPIO_Pin_0 #define ROW_2 GPIO_Pin_1 #define ROW_3 GPIO_Pin_2 #define ROW_4 GPIO_Pin_3 #define ROW_5 GPIO_Pin_4 #define ROW_6 GPIO_Pin_5 #define ROW_7 GPIO_Pin_6 #define ROW_8 GPIO_Pin_7
#define COL_1 GPIO_Pin_8 #define COL_2 GPIO_Pin_9 #define COL_3 GPIO_Pin_10 #define COL_4 GPIO_Pin_11 #define COL_5 GPIO_Pin_12 #define COL_6 GPIO_Pin_13 #define COL_7 GPIO_Pin_14 #define COL_8 GPIO_Pin_15
// Define delay function void Delay(__IO uint32_t nCount) { while(nCount--) { } }
int main(void) { // Enable GPIO clock RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB, ENABLE);
// Initialize row pins
GPIO_InitTypeDef GPIO_InitStruct;
G