mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Adding support for boot up Logo's (#32)
This brings across a set of commits to support loading boot up images from a specific location in flash. And also creating a generator tool to make files to put images in said position.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "Oled.h"
|
||||
#include "Settings.h"
|
||||
#include "I2C.h"
|
||||
|
||||
void setup();
|
||||
|
||||
int main(void) {
|
||||
@@ -18,28 +19,29 @@ int main(void) {
|
||||
ProcessUI();
|
||||
DrawUI();
|
||||
delayMs(50); //Slow the system down a little bit
|
||||
if(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_5)==Bit_RESET)
|
||||
{
|
||||
if (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET) {
|
||||
lastMovement = millis();
|
||||
//This is a workaround for the line staying low as the user is still moving. (ie sensitivity is too high for their amount of movement)
|
||||
}
|
||||
}
|
||||
}
|
||||
void setup() {
|
||||
RCC_Config(); //setup system clock
|
||||
NVIC_Config(0x4000); //this shifts the NVIC table to be offset, for the usb bootloader's size
|
||||
GPIO_Config(); //setup all the GPIO pins
|
||||
NVIC_Config(0x4000); //this shifts the NVIC table to be offset, for the usb bootloader's size
|
||||
GPIO_Config(); //setup all the GPIO pins
|
||||
Init_EXTI(); //Init the EXTI inputs
|
||||
Init_Timer3(); //Used for the soldering iron tip
|
||||
Init_Timer3(); //Used for the soldering iron tip
|
||||
Adc_Init(); //Init adc and DMA
|
||||
I2C_Configuration(); //Start the I2C hardware
|
||||
GPIO_Init_OLED(); //Init the GPIO ports for the OLED
|
||||
GPIO_Init_OLED(); //Init the GPIO ports for the OLED
|
||||
restoreSettings(); //Load settings
|
||||
StartUp_Accelerometer(systemSettings.sensitivity); //Start the accelerometer
|
||||
StartUp_Accelerometer(systemSettings.sensitivity); //Start the accelerometer
|
||||
setupPID(); //Init the PID values
|
||||
readIronTemp(systemSettings.tempCalibration, 0,0); //load the default calibration value
|
||||
readIronTemp(systemSettings.tempCalibration, 0, 0); //load the default calibration value
|
||||
Init_Oled(systemSettings.flipDisplay); //Init the OLED display
|
||||
|
||||
OLED_DrawString("VER 1.14", 8); //Version Number
|
||||
delayMs(500); //Pause to show version number
|
||||
Start_Watchdog(1000); //start the system watch dog as 1 second timeout
|
||||
OLED_DrawString("VER 1.15", 8); //Version Number
|
||||
delayMs(300); //Pause to show version number
|
||||
showBootLogoIfavailable();
|
||||
Start_Watchdog(1000); //start the system watch dog as 1 second timeout
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user