mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-27 22:01:26 +03:00
added wrcrooks SOS
This commit is contained in:
parent
daa3d298cd
commit
07315c8b97
28
app/action.c
28
app/action.c
@ -39,20 +39,34 @@
|
||||
#include "ui/inputbox.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
static void ACTION_FlashLight(void)
|
||||
{
|
||||
switch (g_flash_light_state)
|
||||
{
|
||||
case 0:
|
||||
g_flash_light_state++;
|
||||
case FLASHLIGHT_OFF:
|
||||
g_flash_light_state = FLASHLIGHT_ON;
|
||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
||||
break;
|
||||
case 1:
|
||||
g_flash_light_state++;
|
||||
|
||||
case FLASHLIGHT_ON:
|
||||
g_flash_light_state = FLASHLIGHT_BLINK;
|
||||
break;
|
||||
default:
|
||||
g_flash_light_state = 0;
|
||||
|
||||
case FLASHLIGHT_BLINK:
|
||||
g_flash_light_blink_tick_10ms = 0;
|
||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
||||
g_flash_light_state = FLASHLIGHT_SOS;
|
||||
break;
|
||||
|
||||
case FLASHLIGHT_SOS:
|
||||
|
||||
default:
|
||||
g_flash_light_state = FLASHLIGHT_OFF;
|
||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -414,3 +428,5 @@ void ACTION_process(const key_code_t Key, const bool key_pressed, const bool key
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
@ -58,10 +58,10 @@ enum GPIOC_PINS {
|
||||
GPIOC_PIN_PTT = 5
|
||||
};
|
||||
|
||||
void GPIO_ClearBit(volatile uint32_t *pReg, uint8_t Bit);
|
||||
uint8_t GPIO_CheckBit(volatile uint32_t *pReg, uint8_t Bit);
|
||||
void GPIO_FlipBit( volatile uint32_t *pReg, uint8_t Bit);
|
||||
void GPIO_ClearBit(volatile uint32_t *pReg, uint8_t Bit);
|
||||
void GPIO_SetBit( volatile uint32_t *pReg, uint8_t Bit);
|
||||
void GPIO_FlipBit( volatile uint32_t *pReg, uint8_t Bit);
|
||||
|
||||
#endif
|
||||
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
2
misc.c
2
misc.c
@ -216,7 +216,7 @@ bool g_cxcss_tail_found;
|
||||
bool g_squelch_open;
|
||||
|
||||
uint8_t g_flash_light_state;
|
||||
volatile uint16_t g_flash_light_blink_counter;
|
||||
uint16_t g_flash_light_blink_tick_10ms;
|
||||
|
||||
bool g_flag_end_tx;
|
||||
uint16_t g_low_batteryCountdown;
|
||||
|
8
misc.h
8
misc.h
@ -60,7 +60,9 @@ enum {
|
||||
enum {
|
||||
FLASHLIGHT_OFF = 0,
|
||||
FLASHLIGHT_ON,
|
||||
FLASHLIGHT_BLINK
|
||||
FLASHLIGHT_BLINK,
|
||||
FLASHLIGHT_SOS,
|
||||
FLASHLIGHT_LAST
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -300,8 +302,10 @@ extern bool g_cxcss_tail_found;
|
||||
extern uint16_t g_vox_pause_count_down;
|
||||
#endif
|
||||
extern bool g_squelch_open;
|
||||
|
||||
extern uint8_t g_flash_light_state;
|
||||
extern volatile uint16_t g_flash_light_blink_counter;
|
||||
extern uint16_t g_flash_light_blink_tick_10ms;
|
||||
|
||||
extern bool g_flag_end_tx;
|
||||
extern uint16_t g_low_batteryCountdown;
|
||||
extern reception_mode_t g_rx_reception_mode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user