Blink the flash light to show signs of life.

This commit is contained in:
Dual Tachyon 2023-08-10 11:35:02 +01:00
parent 7e2a824bca
commit 726c96c157

10
main.c
View File

@ -26,6 +26,7 @@
#include "driver/flash.h"
#include "driver/gpio.h"
#include "driver/st7565.h"
#include "driver/system.h"
#include "driver/systick.h"
#include "driver/uart.h"
@ -43,6 +44,11 @@ static void FLASHLIGHT_Init(void)
GPIO_SetBit(&GPIOC->DATA, 13);
}
static void FLASHLIGHT_TurnOff(void)
{
GPIO_ClearBit(&GPIOC->DATA, 3);
}
static void FLASHLIGHT_TurnOn(void)
{
GPIO_SetBit(&GPIOC->DATA, 3);
@ -87,6 +93,10 @@ void Main(void)
EEPROM_ReadBuffer(0x0EB0, Test, 8);
while (1) {
SYSTEM_DelayMs(500);
FLASHLIGHT_TurnOff();
SYSTEM_DelayMs(500);
FLASHLIGHT_TurnOn();
}
}