Skip to content

Commit

Permalink
demo mem capacity info, more cs
Browse files Browse the repository at this point in the history
  • Loading branch information
FT9R committed Mar 26, 2024
1 parent 3ac4a95 commit f04adb7
Show file tree
Hide file tree
Showing 6 changed files with 1,263 additions and 1,229 deletions.
6 changes: 6 additions & 0 deletions Examples/STM32F401CDU6/Core/Inc/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ void Error_Handler(void);
/* Private defines -----------------------------------------------------------*/
#define USER_LED_Pin GPIO_PIN_13
#define USER_LED_GPIO_Port GPIOC
#define SPI1_CS3_Pin GPIO_PIN_1
#define SPI1_CS3_GPIO_Port GPIOA
#define SPI1_CS2_Pin GPIO_PIN_2
#define SPI1_CS2_GPIO_Port GPIOA
#define SPI1_CS1_Pin GPIO_PIN_3
#define SPI1_CS1_GPIO_Port GPIOA
#define SPI1_CS0_Pin GPIO_PIN_4
#define SPI1_CS0_GPIO_Port GPIOA

Expand Down
8 changes: 4 additions & 4 deletions Examples/STM32F401CDU6/Core/Src/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void MX_GPIO_Init(void)
HAL_GPIO_WritePin(USER_LED_GPIO_Port, USER_LED_Pin, GPIO_PIN_SET);

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(SPI1_CS0_GPIO_Port, SPI1_CS0_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOA, SPI1_CS3_Pin|SPI1_CS2_Pin|SPI1_CS1_Pin|SPI1_CS0_Pin, GPIO_PIN_SET);

/*Configure GPIO pin : PtPin */
GPIO_InitStruct.Pin = USER_LED_Pin;
Expand All @@ -63,12 +63,12 @@ void MX_GPIO_Init(void)
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(USER_LED_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : PtPin */
GPIO_InitStruct.Pin = SPI1_CS0_Pin;
/*Configure GPIO pins : PAPin PAPin PAPin PAPin */
GPIO_InitStruct.Pin = SPI1_CS3_Pin|SPI1_CS2_Pin|SPI1_CS1_Pin|SPI1_CS0_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
HAL_GPIO_Init(SPI1_CS0_GPIO_Port, &GPIO_InitStruct);
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

}

Expand Down
Loading

0 comments on commit f04adb7

Please sign in to comment.