mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Logo rework (#1232)
!Allows for new logo format that supports animation! Also moves logos out of repo into their own repo for ease of management. Changes: * Remove deprecated logos * Draft new Bootloader decoder * Use new logo handler * Simplify logo code further * Fix time bug on static images * Fix exit at end of animation * Docs * Interframe delay in 5ms increments * Quick pass handling empty updates * Exit at the end _after_ the frame delay * One final delay * Fix for overrun of logo data * Fixes https://github.com/Ralim/IronOS-Meta/issues/7
This commit is contained in:
@@ -156,3 +156,5 @@
|
||||
#define NO_SLEEP_MODE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* logo.c
|
||||
*
|
||||
* Created on: 29 May 2020
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#include "BSP.h"
|
||||
#include "OLED.hpp"
|
||||
|
||||
static uint8_t logo_page[1024] __attribute__((section(".logo_page")));
|
||||
|
||||
// Logo header signature.
|
||||
#define LOGO_HEADER_VALUE 0xF00DAA55
|
||||
|
||||
uint8_t showBootLogoIfavailable() {
|
||||
// Do not show logo data if signature is not found.
|
||||
if (LOGO_HEADER_VALUE != *(reinterpret_cast<const uint32_t *>(logo_page))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
OLED::drawAreaSwapped(0, 0, 96, 16, (uint8_t *)(logo_page + 4));
|
||||
OLED::refresh();
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user