mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
* Creating uart debug handler * Simpler get raw uV tip * Update Setup.cpp * Debug out working. Moved Logo Need to update docs around logos before merging this in * Add in current pwm level + fix signed int * Update moving logo page for pinecil by 64k * Update TipThermoModel.h
25 lines
600 B
C++
25 lines
600 B
C++
/*
|
|
* logo.c
|
|
*
|
|
* Created on: 29 May 2020
|
|
* Author: Ralim
|
|
*/
|
|
|
|
#include "BSP.h"
|
|
#include "OLED.hpp"
|
|
// Second last page of flash set aside for logo image.
|
|
#define FLASH_LOGOADDR (0x08000000 + (126 * 1024))
|
|
// 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 *>(FLASH_LOGOADDR))) {
|
|
return 0;
|
|
}
|
|
|
|
OLED::drawAreaSwapped(0, 0, 96, 16, (uint8_t *)(FLASH_LOGOADDR + 4));
|
|
OLED::refresh();
|
|
return 1;
|
|
}
|