mirror of
https://github.com/DualTachyon/uv-k5-firmware.git
synced 2024-12-09 09:30:36 +08:00
Blink the flash light to show signs of life.
This commit is contained in:
parent
7e2a824bca
commit
726c96c157
10
main.c
10
main.c
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user