stm32f103_lcds_st75256: add badapple binary file
This commit is contained in:
parent
7301275a2d
commit
10d4a53aa8
@ -14,23 +14,26 @@ void app_main(void)
|
||||
{
|
||||
bsp_lcd_init_regs();
|
||||
|
||||
#if BSP_LCD_4GRAY_ENABLE
|
||||
app_play_badapple();
|
||||
#else
|
||||
#if !BSP_LCD_4GRAY_ENABLE
|
||||
app_fatfs_test();
|
||||
HAL_Delay(2000);
|
||||
#endif
|
||||
|
||||
app_play_badapple();
|
||||
|
||||
while (1) {
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(500);
|
||||
}
|
||||
}
|
||||
|
||||
#if BSP_LCD_4GRAY_ENABLE
|
||||
|
||||
#define APP_BADAPPLE_X_PIXELS 192
|
||||
#define APP_BADAPPLE_Y_PIXELS 128
|
||||
#if BSP_LCD_4GRAY_ENABLE
|
||||
#define APP_BADAPPLE_FRAME_SIZE ((APP_BADAPPLE_X_PIXELS) * (APP_BADAPPLE_Y_PIXELS) / 4) //4灰
|
||||
#else
|
||||
#define APP_BADAPPLE_FRAME_SIZE ((APP_BADAPPLE_X_PIXELS) * (APP_BADAPPLE_Y_PIXELS) / 8) //单色
|
||||
#endif
|
||||
|
||||
volatile uint8_t next_frame = 0;
|
||||
|
||||
@ -53,7 +56,11 @@ void app_play_badapple(void)
|
||||
|
||||
while (1) {
|
||||
FIL file;
|
||||
f_result = f_open(&file, "BadApple.bin", FA_READ);
|
||||
#if BSP_LCD_4GRAY_ENABLE
|
||||
f_result = f_open(&file, "/ba_4gray.bin", FA_READ);
|
||||
#else
|
||||
f_result = f_open(&file, "/ba_mono.bin", FA_READ);
|
||||
#endif
|
||||
if (f_result != FR_OK) {
|
||||
return;
|
||||
}
|
||||
@ -80,8 +87,6 @@ void app_play_badapple(void)
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void app_fatfs_test(void)
|
||||
{
|
||||
const char *path = "/rwtest.bin";
|
||||
@ -189,6 +194,6 @@ void app_fatfs_test(void)
|
||||
} else {
|
||||
bsp_lcd_show_6_8_string(line_count, char_count * 6, " mismatches!");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
f_unmount("/");
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ bsp_sd_error_t bsp_sd_init(void)
|
||||
sd_write_read_byte(0xFF); //在MOSI上发送不少于74个脉冲
|
||||
}
|
||||
|
||||
card_info.card_type = bsp_sd_type_unknown; //复位卡版本
|
||||
memset(&card_info, 0, sizeof(card_info)); //复位卡信息结构体
|
||||
|
||||
uint8_t r1_response;
|
||||
uint32_t timeout = SD_WAIT_CMD_RESP_TIMEOUT;
|
||||
|
||||
@ -104,6 +104,7 @@ DRESULT disk_write (
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* Miscellaneous Functions */
|
||||
/*-----------------------------------------------------------------------*/
|
||||
@ -121,8 +122,12 @@ DRESULT disk_ioctl (
|
||||
case GET_BLOCK_SIZE:
|
||||
*(DWORD *)buff = BSP_SD_BLOCK_SIZE;
|
||||
return RES_OK;
|
||||
case GET_SECTOR_COUNT:
|
||||
bsp_card_info_t card_info;
|
||||
bsp_sd_spi_get_card_info(&card_info);
|
||||
*(DWORD *)buff = card_info.sector_count;
|
||||
break;
|
||||
default:
|
||||
return RES_PARERR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
stm32f103_lcds_st75256/badapple_192x128_4gray.bin.zip
Normal file
BIN
stm32f103_lcds_st75256/badapple_192x128_4gray.bin.zip
Normal file
Binary file not shown.
BIN
stm32f103_lcds_st75256/badapple_192x128_mono.bin.zip
Normal file
BIN
stm32f103_lcds_st75256/badapple_192x128_mono.bin.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user