解决了因为汉字在两个数据块直接导致的数据流乱码,
下个版本打算两字节两个字节的读取,这样就就不怕数据块中 换行太多导致显示不下。 Signed-off-by: 无闻风 <53944749+wuwenfengmi1998@users.noreply.github.com>
This commit is contained in:
@@ -58,6 +58,12 @@ void Error_Handler(void);
|
||||
/* USER CODE END EFP */
|
||||
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
#define KEY_UP_Pin GPIO_PIN_2
|
||||
#define KEY_UP_GPIO_Port GPIOE
|
||||
#define KEY_B_Pin GPIO_PIN_3
|
||||
#define KEY_B_GPIO_Port GPIOE
|
||||
#define KEY_DOWN_Pin GPIO_PIN_4
|
||||
#define KEY_DOWN_GPIO_Port GPIOE
|
||||
#define LCD_BL_Pin GPIO_PIN_0
|
||||
#define LCD_BL_GPIO_Port GPIOB
|
||||
#define FLASH_E_Pin GPIO_PIN_12
|
||||
|
||||
@@ -196,9 +196,9 @@ static void MX_GPIO_Init(void)
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
|
||||
/* GPIO Ports Clock Enable */
|
||||
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOG_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
|
||||
@@ -208,6 +208,12 @@ static void MX_GPIO_Init(void)
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(SD_E_GPIO_Port, SD_E_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pins : KEY_UP_Pin KEY_B_Pin KEY_DOWN_Pin */
|
||||
GPIO_InitStruct.Pin = KEY_UP_Pin|KEY_B_Pin|KEY_DOWN_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : LCD_BL_Pin */
|
||||
GPIO_InitStruct.Pin = LCD_BL_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
|
||||
Reference in New Issue
Block a user