mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-27 06:50:21 +00:00
917410a0a8
* fbt: reworking targets & assets handling WIP * fbt: dist fixes * fbt: moved SD card resources to owning apps * unit_tests: moved resources to app folder * github: updated unit_tests paths * github: packaging fixes * unit_tests: fixes * fbt: assets: internal cleanup * fbt: reworked assets handling * github: unit_tests: reintroducing fixes * minor cleanup * fbt: naming changes to reflect private nature of scons tools * fbt: resources: fixed dist archive paths * docs: updated paths * docs: updated more paths * docs: included "resources" parameter in app manifest docs; updated assets readme * updated gitignore for assets * github: updated action versions * unit_tests: restored timeout; scripts: assets: logging changes * gh: don't upload desktop animations for unit test run Co-authored-by: あく <alleteam@gmail.com>
41 lines
No EOL
1.2 KiB
C
41 lines
No EOL
1.2 KiB
C
#include <furi_hal_debug.h>
|
|
|
|
#include <stm32wbxx_ll_exti.h>
|
|
#include <stm32wbxx_ll_system.h>
|
|
|
|
#include <furi_hal_gpio.h>
|
|
#include <furi_hal_resources.h>
|
|
|
|
volatile bool furi_hal_debug_gdb_session_active = false;
|
|
|
|
void furi_hal_debug_enable() {
|
|
// Low power mode debug
|
|
LL_DBGMCU_EnableDBGSleepMode();
|
|
LL_DBGMCU_EnableDBGStopMode();
|
|
LL_DBGMCU_EnableDBGStandbyMode();
|
|
LL_EXTI_EnableIT_32_63(LL_EXTI_LINE_48);
|
|
// SWD GPIO
|
|
furi_hal_gpio_init_ex(
|
|
&gpio_swdio,
|
|
GpioModeAltFunctionPushPull,
|
|
GpioPullUp,
|
|
GpioSpeedVeryHigh,
|
|
GpioAltFn0JTMS_SWDIO);
|
|
furi_hal_gpio_init_ex(
|
|
&gpio_swclk, GpioModeAltFunctionPushPull, GpioPullDown, GpioSpeedLow, GpioAltFn0JTCK_SWCLK);
|
|
}
|
|
|
|
void furi_hal_debug_disable() {
|
|
// Low power mode debug
|
|
LL_DBGMCU_DisableDBGSleepMode();
|
|
LL_DBGMCU_DisableDBGStopMode();
|
|
LL_DBGMCU_DisableDBGStandbyMode();
|
|
LL_EXTI_DisableIT_32_63(LL_EXTI_LINE_48);
|
|
// SWD GPIO
|
|
furi_hal_gpio_init_simple(&gpio_swdio, GpioModeAnalog);
|
|
furi_hal_gpio_init_simple(&gpio_swclk, GpioModeAnalog);
|
|
}
|
|
|
|
bool furi_hal_debug_is_gdb_session_active() {
|
|
return furi_hal_debug_gdb_session_active;
|
|
} |