[FL-2844] desktop: removing slideshow file when leaving slideshow view (#1762)

* [FL-2844] desktop: removing slideshow file when leaving slideshow view; vscode: fix for BM port fetcher; fap api: more symbols for LL
* desktop: actually removing slideshow file
* desktop: moved slideshow removal to scene code; fbt: better blackmagic device handling
* fbt: disabled pagination for gdb
* vscode: restored blackmagic command line
* fbt: fixed debug_other target; added debug_other_blackmagic
* furi: added furi_thread_suspend API group; fixed null-pointer deref for thread name; cleaned up RTOS config
* furi: changed thread state check to eTaskGetState
This commit is contained in:
hedger 2022-09-21 18:42:59 +04:00 committed by GitHub
parent 3360f818a1
commit 432ff41d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 84 additions and 37 deletions

View File

@ -9,6 +9,10 @@
"type": "command", "type": "command",
"command": "shellCommand.execute", "command": "shellCommand.execute",
"args": { "args": {
"useSingleResult": true,
"env": {
"PATH": "${workspaceFolder};${env:PATH}"
},
"command": "./fbt get_blackmagic", "command": "./fbt get_blackmagic",
"description": "Get Blackmagic device", "description": "Get Blackmagic device",
} }

View File

@ -44,6 +44,8 @@ distenv = coreenv.Clone(
"target extended-remote ${GDBREMOTE}", "target extended-remote ${GDBREMOTE}",
"-ex", "-ex",
"set confirm off", "set confirm off",
"-ex",
"set pagination off",
], ],
GDBOPTS_BLACKMAGIC=[ GDBOPTS_BLACKMAGIC=[
"-ex", "-ex",
@ -234,10 +236,19 @@ distenv.PhonyTarget(
distenv.PhonyTarget( distenv.PhonyTarget(
"debug_other", "debug_other",
"${GDBPYCOM}", "${GDBPYCOM}",
GDBPYOPTS='-ex "source debug/PyCortexMDebug/PyCortexMDebug.py" ', GDBOPTS="${GDBOPTS_BASE}",
GDBREMOTE="${OPENOCD_GDB_PIPE}", GDBREMOTE="${OPENOCD_GDB_PIPE}",
GDBPYOPTS='-ex "source debug/PyCortexMDebug/PyCortexMDebug.py" ',
) )
distenv.PhonyTarget(
"debug_other_blackmagic",
"${GDBPYCOM}",
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
GDBREMOTE="$${BLACKMAGIC_ADDR}",
)
# Just start OpenOCD # Just start OpenOCD
distenv.PhonyTarget( distenv.PhonyTarget(
"openocd", "openocd",

View File

@ -22,15 +22,11 @@ void desktop_scene_slideshow_on_enter(void* context) {
bool desktop_scene_slideshow_on_event(void* context, SceneManagerEvent event) { bool desktop_scene_slideshow_on_event(void* context, SceneManagerEvent event) {
Desktop* desktop = (Desktop*)context; Desktop* desktop = (Desktop*)context;
bool consumed = false; bool consumed = false;
Storage* storage = NULL;
Power* power = NULL; Power* power = NULL;
if(event.type == SceneManagerEventTypeCustom) { if(event.type == SceneManagerEventTypeCustom) {
switch(event.event) { switch(event.event) {
case DesktopSlideshowCompleted: case DesktopSlideshowCompleted:
storage = furi_record_open(RECORD_STORAGE);
storage_common_remove(storage, SLIDESHOW_FS_PATH);
furi_record_close(RECORD_STORAGE);
scene_manager_previous_scene(desktop->scene_manager); scene_manager_previous_scene(desktop->scene_manager);
consumed = true; consumed = true;
break; break;
@ -50,4 +46,8 @@ bool desktop_scene_slideshow_on_event(void* context, SceneManagerEvent event) {
void desktop_scene_slideshow_on_exit(void* context) { void desktop_scene_slideshow_on_exit(void* context) {
UNUSED(context); UNUSED(context);
Storage* storage = furi_record_open(RECORD_STORAGE);
storage_common_remove(storage, SLIDESHOW_FS_PATH);
furi_record_close(RECORD_STORAGE);
} }

View File

@ -49,7 +49,7 @@ To run cleanup (think of `make clean`) for specified targets, add `-c` option.
- `flash` - flash attached device with OpenOCD over ST-Link - `flash` - flash attached device with OpenOCD over ST-Link
- `flash_usb`, `flash_usb_full` - build, upload and install update package to device over USB. See details on `updater_package`, `updater_minpackage` - `flash_usb`, `flash_usb_full` - build, upload and install update package to device over USB. See details on `updater_package`, `updater_minpackage`
- `debug` - build and flash firmware, then attach with gdb with firmware's .elf loaded - `debug` - build and flash firmware, then attach with gdb with firmware's .elf loaded
- `debug_other` - attach gdb without loading any .elf. Allows to manually add external elf files with `add-symbol-file` in gdb - `debug_other`, `debug_other_blackmagic` - attach gdb without loading any .elf. Allows to manually add external elf files with `add-symbol-file` in gdb
- `updater_debug` - attach gdb with updater's .elf loaded - `updater_debug` - attach gdb with updater's .elf loaded
- `blackmagic` - debug firmware with Blackmagic probe (WiFi dev board) - `blackmagic` - debug firmware with Blackmagic probe (WiFi dev board)
- `openocd` - just start OpenOCD - `openocd` - just start OpenOCD

View File

@ -76,19 +76,8 @@ to exclude the API function. */
#define INCLUDE_xTaskGetSchedulerState 1 #define INCLUDE_xTaskGetSchedulerState 1
#define INCLUDE_xTimerPendFunctionCall 1 #define INCLUDE_xTimerPendFunctionCall 1
/* CMSIS-RTOS V2 flags */ /* Furi-specific */
#define configUSE_OS2_THREAD_SUSPEND_RESUME 1
#define configUSE_OS2_THREAD_ENUMERATE 1
#define configUSE_OS2_THREAD_FLAGS 1
#define configUSE_OS2_TIMER 1
#define configUSE_OS2_MUTEX 1
// NEVER TO BE USED, because of their hard realtime nature
// #define configUSE_OS2_EVENTFLAGS_FROM_ISR 1
/* CMSIS-RTOS */
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 2 #define configTASK_NOTIFICATION_ARRAY_ENTRIES 2
#define CMSIS_TASK_NOTIFY_INDEX 1
extern __attribute__((__noreturn__)) void furi_thread_catch(); extern __attribute__((__noreturn__)) void furi_thread_catch();
#define configTASK_RETURN_ADDRESS (furi_thread_catch + 2) #define configTASK_RETURN_ADDRESS (furi_thread_catch + 2)

View File

@ -1,5 +1,5 @@
entry,status,name,type,params entry,status,name,type,params
Version,+,1.7,, Version,+,1.9,,
Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,, Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,, Header,+,applications/services/cli/cli_vcp.h,,
@ -157,29 +157,29 @@ Function,-,LL_ADC_REG_Init,ErrorStatus,"ADC_TypeDef*, LL_ADC_REG_InitTypeDef*"
Function,-,LL_ADC_REG_StructInit,void,LL_ADC_REG_InitTypeDef* Function,-,LL_ADC_REG_StructInit,void,LL_ADC_REG_InitTypeDef*
Function,-,LL_ADC_StructInit,void,LL_ADC_InitTypeDef* Function,-,LL_ADC_StructInit,void,LL_ADC_InitTypeDef*
Function,-,LL_COMP_DeInit,ErrorStatus,COMP_TypeDef* Function,-,LL_COMP_DeInit,ErrorStatus,COMP_TypeDef*
Function,-,LL_COMP_Init,ErrorStatus,"COMP_TypeDef*, LL_COMP_InitTypeDef*" Function,+,LL_COMP_Init,ErrorStatus,"COMP_TypeDef*, LL_COMP_InitTypeDef*"
Function,-,LL_COMP_StructInit,void,LL_COMP_InitTypeDef* Function,-,LL_COMP_StructInit,void,LL_COMP_InitTypeDef*
Function,-,LL_CRC_DeInit,ErrorStatus,CRC_TypeDef* Function,-,LL_CRC_DeInit,ErrorStatus,CRC_TypeDef*
Function,-,LL_CRS_DeInit,ErrorStatus, Function,-,LL_CRS_DeInit,ErrorStatus,
Function,-,LL_DMA_DeInit,ErrorStatus,"DMA_TypeDef*, uint32_t" Function,+,LL_DMA_DeInit,ErrorStatus,"DMA_TypeDef*, uint32_t"
Function,-,LL_DMA_Init,ErrorStatus,"DMA_TypeDef*, uint32_t, LL_DMA_InitTypeDef*" Function,+,LL_DMA_Init,ErrorStatus,"DMA_TypeDef*, uint32_t, LL_DMA_InitTypeDef*"
Function,-,LL_DMA_StructInit,void,LL_DMA_InitTypeDef* Function,-,LL_DMA_StructInit,void,LL_DMA_InitTypeDef*
Function,-,LL_EXTI_DeInit,ErrorStatus, Function,-,LL_EXTI_DeInit,ErrorStatus,
Function,-,LL_EXTI_Init,ErrorStatus,LL_EXTI_InitTypeDef* Function,-,LL_EXTI_Init,ErrorStatus,LL_EXTI_InitTypeDef*
Function,-,LL_EXTI_StructInit,void,LL_EXTI_InitTypeDef* Function,-,LL_EXTI_StructInit,void,LL_EXTI_InitTypeDef*
Function,-,LL_GPIO_DeInit,ErrorStatus,GPIO_TypeDef* Function,-,LL_GPIO_DeInit,ErrorStatus,GPIO_TypeDef*
Function,-,LL_GPIO_Init,ErrorStatus,"GPIO_TypeDef*, LL_GPIO_InitTypeDef*" Function,+,LL_GPIO_Init,ErrorStatus,"GPIO_TypeDef*, LL_GPIO_InitTypeDef*"
Function,-,LL_GPIO_StructInit,void,LL_GPIO_InitTypeDef* Function,-,LL_GPIO_StructInit,void,LL_GPIO_InitTypeDef*
Function,-,LL_I2C_DeInit,ErrorStatus,I2C_TypeDef* Function,-,LL_I2C_DeInit,ErrorStatus,I2C_TypeDef*
Function,-,LL_I2C_Init,ErrorStatus,"I2C_TypeDef*, LL_I2C_InitTypeDef*" Function,+,LL_I2C_Init,ErrorStatus,"I2C_TypeDef*, LL_I2C_InitTypeDef*"
Function,-,LL_I2C_StructInit,void,LL_I2C_InitTypeDef* Function,-,LL_I2C_StructInit,void,LL_I2C_InitTypeDef*
Function,-,LL_Init1msTick,void,uint32_t Function,-,LL_Init1msTick,void,uint32_t
Function,-,LL_LPTIM_DeInit,ErrorStatus,LPTIM_TypeDef* Function,+,LL_LPTIM_DeInit,ErrorStatus,LPTIM_TypeDef*
Function,-,LL_LPTIM_Disable,void,LPTIM_TypeDef* Function,-,LL_LPTIM_Disable,void,LPTIM_TypeDef*
Function,-,LL_LPTIM_Init,ErrorStatus,"LPTIM_TypeDef*, LL_LPTIM_InitTypeDef*" Function,+,LL_LPTIM_Init,ErrorStatus,"LPTIM_TypeDef*, LL_LPTIM_InitTypeDef*"
Function,-,LL_LPTIM_StructInit,void,LL_LPTIM_InitTypeDef* Function,-,LL_LPTIM_StructInit,void,LL_LPTIM_InitTypeDef*
Function,-,LL_LPUART_DeInit,ErrorStatus,USART_TypeDef* Function,-,LL_LPUART_DeInit,ErrorStatus,USART_TypeDef*
Function,-,LL_LPUART_Init,ErrorStatus,"USART_TypeDef*, LL_LPUART_InitTypeDef*" Function,+,LL_LPUART_Init,ErrorStatus,"USART_TypeDef*, LL_LPUART_InitTypeDef*"
Function,-,LL_LPUART_StructInit,void,LL_LPUART_InitTypeDef* Function,-,LL_LPUART_StructInit,void,LL_LPUART_InitTypeDef*
Function,-,LL_PKA_DeInit,ErrorStatus,PKA_TypeDef* Function,-,LL_PKA_DeInit,ErrorStatus,PKA_TypeDef*
Function,-,LL_PKA_Init,ErrorStatus,"PKA_TypeDef*, LL_PKA_InitTypeDef*" Function,-,LL_PKA_Init,ErrorStatus,"PKA_TypeDef*, LL_PKA_InitTypeDef*"
@ -193,14 +193,14 @@ Function,-,LL_RCC_GetADCClockFreq,uint32_t,uint32_t
Function,-,LL_RCC_GetCLK48ClockFreq,uint32_t,uint32_t Function,-,LL_RCC_GetCLK48ClockFreq,uint32_t,uint32_t
Function,-,LL_RCC_GetI2CClockFreq,uint32_t,uint32_t Function,-,LL_RCC_GetI2CClockFreq,uint32_t,uint32_t
Function,-,LL_RCC_GetLPTIMClockFreq,uint32_t,uint32_t Function,-,LL_RCC_GetLPTIMClockFreq,uint32_t,uint32_t
Function,-,LL_RCC_GetLPUARTClockFreq,uint32_t,uint32_t Function,+,LL_RCC_GetLPUARTClockFreq,uint32_t,uint32_t
Function,-,LL_RCC_GetRFWKPClockFreq,uint32_t, Function,-,LL_RCC_GetRFWKPClockFreq,uint32_t,
Function,-,LL_RCC_GetRNGClockFreq,uint32_t,uint32_t Function,-,LL_RCC_GetRNGClockFreq,uint32_t,uint32_t
Function,-,LL_RCC_GetRTCClockFreq,uint32_t, Function,-,LL_RCC_GetRTCClockFreq,uint32_t,
Function,-,LL_RCC_GetSAIClockFreq,uint32_t,uint32_t Function,-,LL_RCC_GetSAIClockFreq,uint32_t,uint32_t
Function,-,LL_RCC_GetSMPSClockFreq,uint32_t, Function,-,LL_RCC_GetSMPSClockFreq,uint32_t,
Function,-,LL_RCC_GetSystemClocksFreq,void,LL_RCC_ClocksTypeDef* Function,-,LL_RCC_GetSystemClocksFreq,void,LL_RCC_ClocksTypeDef*
Function,-,LL_RCC_GetUSARTClockFreq,uint32_t,uint32_t Function,+,LL_RCC_GetUSARTClockFreq,uint32_t,uint32_t
Function,-,LL_RCC_GetUSBClockFreq,uint32_t,uint32_t Function,-,LL_RCC_GetUSBClockFreq,uint32_t,uint32_t
Function,-,LL_RNG_DeInit,ErrorStatus,RNG_TypeDef* Function,-,LL_RNG_DeInit,ErrorStatus,RNG_TypeDef*
Function,-,LL_RNG_Init,ErrorStatus,"RNG_TypeDef*, LL_RNG_InitTypeDef*" Function,-,LL_RNG_Init,ErrorStatus,"RNG_TypeDef*, LL_RNG_InitTypeDef*"
@ -212,21 +212,21 @@ Function,-,LL_RTC_ALMB_StructInit,void,LL_RTC_AlarmTypeDef*
Function,-,LL_RTC_DATE_Init,ErrorStatus,"RTC_TypeDef*, uint32_t, LL_RTC_DateTypeDef*" Function,-,LL_RTC_DATE_Init,ErrorStatus,"RTC_TypeDef*, uint32_t, LL_RTC_DateTypeDef*"
Function,-,LL_RTC_DATE_StructInit,void,LL_RTC_DateTypeDef* Function,-,LL_RTC_DATE_StructInit,void,LL_RTC_DateTypeDef*
Function,-,LL_RTC_DeInit,ErrorStatus,RTC_TypeDef* Function,-,LL_RTC_DeInit,ErrorStatus,RTC_TypeDef*
Function,-,LL_RTC_EnterInitMode,ErrorStatus,RTC_TypeDef* Function,+,LL_RTC_EnterInitMode,ErrorStatus,RTC_TypeDef*
Function,-,LL_RTC_ExitInitMode,ErrorStatus,RTC_TypeDef* Function,-,LL_RTC_ExitInitMode,ErrorStatus,RTC_TypeDef*
Function,-,LL_RTC_Init,ErrorStatus,"RTC_TypeDef*, LL_RTC_InitTypeDef*" Function,+,LL_RTC_Init,ErrorStatus,"RTC_TypeDef*, LL_RTC_InitTypeDef*"
Function,-,LL_RTC_StructInit,void,LL_RTC_InitTypeDef* Function,-,LL_RTC_StructInit,void,LL_RTC_InitTypeDef*
Function,-,LL_RTC_TIME_Init,ErrorStatus,"RTC_TypeDef*, uint32_t, LL_RTC_TimeTypeDef*" Function,-,LL_RTC_TIME_Init,ErrorStatus,"RTC_TypeDef*, uint32_t, LL_RTC_TimeTypeDef*"
Function,-,LL_RTC_TIME_StructInit,void,LL_RTC_TimeTypeDef* Function,-,LL_RTC_TIME_StructInit,void,LL_RTC_TimeTypeDef*
Function,-,LL_RTC_WaitForSynchro,ErrorStatus,RTC_TypeDef* Function,-,LL_RTC_WaitForSynchro,ErrorStatus,RTC_TypeDef*
Function,-,LL_SPI_DeInit,ErrorStatus,SPI_TypeDef* Function,-,LL_SPI_DeInit,ErrorStatus,SPI_TypeDef*
Function,-,LL_SPI_Init,ErrorStatus,"SPI_TypeDef*, LL_SPI_InitTypeDef*" Function,+,LL_SPI_Init,ErrorStatus,"SPI_TypeDef*, LL_SPI_InitTypeDef*"
Function,-,LL_SPI_StructInit,void,LL_SPI_InitTypeDef* Function,-,LL_SPI_StructInit,void,LL_SPI_InitTypeDef*
Function,-,LL_SetFlashLatency,ErrorStatus,uint32_t Function,-,LL_SetFlashLatency,ErrorStatus,uint32_t
Function,-,LL_SetSystemCoreClock,void,uint32_t Function,+,LL_SetSystemCoreClock,void,uint32_t
Function,-,LL_TIM_BDTR_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_BDTR_InitTypeDef*" Function,-,LL_TIM_BDTR_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_BDTR_InitTypeDef*"
Function,-,LL_TIM_BDTR_StructInit,void,LL_TIM_BDTR_InitTypeDef* Function,-,LL_TIM_BDTR_StructInit,void,LL_TIM_BDTR_InitTypeDef*
Function,-,LL_TIM_DeInit,ErrorStatus,TIM_TypeDef* Function,+,LL_TIM_DeInit,ErrorStatus,TIM_TypeDef*
Function,-,LL_TIM_ENCODER_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_ENCODER_InitTypeDef*" Function,-,LL_TIM_ENCODER_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_ENCODER_InitTypeDef*"
Function,-,LL_TIM_ENCODER_StructInit,void,LL_TIM_ENCODER_InitTypeDef* Function,-,LL_TIM_ENCODER_StructInit,void,LL_TIM_ENCODER_InitTypeDef*
Function,-,LL_TIM_HALLSENSOR_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_HALLSENSOR_InitTypeDef*" Function,-,LL_TIM_HALLSENSOR_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_HALLSENSOR_InitTypeDef*"
@ -240,7 +240,7 @@ Function,-,LL_TIM_StructInit,void,LL_TIM_InitTypeDef*
Function,-,LL_USART_ClockInit,ErrorStatus,"USART_TypeDef*, LL_USART_ClockInitTypeDef*" Function,-,LL_USART_ClockInit,ErrorStatus,"USART_TypeDef*, LL_USART_ClockInitTypeDef*"
Function,-,LL_USART_ClockStructInit,void,LL_USART_ClockInitTypeDef* Function,-,LL_USART_ClockStructInit,void,LL_USART_ClockInitTypeDef*
Function,-,LL_USART_DeInit,ErrorStatus,USART_TypeDef* Function,-,LL_USART_DeInit,ErrorStatus,USART_TypeDef*
Function,-,LL_USART_Init,ErrorStatus,"USART_TypeDef*, LL_USART_InitTypeDef*" Function,+,LL_USART_Init,ErrorStatus,"USART_TypeDef*, LL_USART_InitTypeDef*"
Function,-,LL_USART_StructInit,void,LL_USART_InitTypeDef* Function,-,LL_USART_StructInit,void,LL_USART_InitTypeDef*
Function,-,LL_mDelay,void,uint32_t Function,-,LL_mDelay,void,uint32_t
Function,-,SystemCoreClockUpdate,void, Function,-,SystemCoreClockUpdate,void,
@ -1353,8 +1353,10 @@ Function,+,furi_thread_get_name,const char*,FuriThreadId
Function,+,furi_thread_get_return_code,int32_t,FuriThread* Function,+,furi_thread_get_return_code,int32_t,FuriThread*
Function,+,furi_thread_get_stack_space,uint32_t,FuriThreadId Function,+,furi_thread_get_stack_space,uint32_t,FuriThreadId
Function,+,furi_thread_get_state,FuriThreadState,FuriThread* Function,+,furi_thread_get_state,FuriThreadState,FuriThread*
Function,+,furi_thread_is_suspended,_Bool,FuriThreadId
Function,+,furi_thread_join,_Bool,FuriThread* Function,+,furi_thread_join,_Bool,FuriThread*
Function,+,furi_thread_mark_as_service,void,FuriThread* Function,+,furi_thread_mark_as_service,void,FuriThread*
Function,+,furi_thread_resume,void,FuriThreadId
Function,+,furi_thread_set_callback,void,"FuriThread*, FuriThreadCallback" Function,+,furi_thread_set_callback,void,"FuriThread*, FuriThreadCallback"
Function,+,furi_thread_set_context,void,"FuriThread*, void*" Function,+,furi_thread_set_context,void,"FuriThread*, void*"
Function,+,furi_thread_set_name,void,"FuriThread*, const char*" Function,+,furi_thread_set_name,void,"FuriThread*, const char*"
@ -1366,6 +1368,7 @@ Function,+,furi_thread_set_stdout_callback,_Bool,FuriThreadStdoutWriteCallback
Function,+,furi_thread_start,void,FuriThread* Function,+,furi_thread_start,void,FuriThread*
Function,+,furi_thread_stdout_flush,int32_t, Function,+,furi_thread_stdout_flush,int32_t,
Function,+,furi_thread_stdout_write,size_t,"const char*, size_t" Function,+,furi_thread_stdout_write,size_t,"const char*, size_t"
Function,+,furi_thread_suspend,void,FuriThreadId
Function,+,furi_thread_yield,void, Function,+,furi_thread_yield,void,
Function,+,furi_timer_alloc,FuriTimer*,"FuriTimerCallback, FuriTimerType, void*" Function,+,furi_timer_alloc,FuriTimer*,"FuriTimerCallback, FuriTimerType, void*"
Function,+,furi_timer_free,void,FuriTimer* Function,+,furi_timer_free,void,FuriTimer*

1 entry status name type params
2 Version + 1.7 1.9
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
157 Function - LL_ADC_REG_StructInit void LL_ADC_REG_InitTypeDef*
158 Function - LL_ADC_StructInit void LL_ADC_InitTypeDef*
159 Function - LL_COMP_DeInit ErrorStatus COMP_TypeDef*
160 Function - + LL_COMP_Init ErrorStatus COMP_TypeDef*, LL_COMP_InitTypeDef*
161 Function - LL_COMP_StructInit void LL_COMP_InitTypeDef*
162 Function - LL_CRC_DeInit ErrorStatus CRC_TypeDef*
163 Function - LL_CRS_DeInit ErrorStatus
164 Function - + LL_DMA_DeInit ErrorStatus DMA_TypeDef*, uint32_t
165 Function - + LL_DMA_Init ErrorStatus DMA_TypeDef*, uint32_t, LL_DMA_InitTypeDef*
166 Function - LL_DMA_StructInit void LL_DMA_InitTypeDef*
167 Function - LL_EXTI_DeInit ErrorStatus
168 Function - LL_EXTI_Init ErrorStatus LL_EXTI_InitTypeDef*
169 Function - LL_EXTI_StructInit void LL_EXTI_InitTypeDef*
170 Function - LL_GPIO_DeInit ErrorStatus GPIO_TypeDef*
171 Function - + LL_GPIO_Init ErrorStatus GPIO_TypeDef*, LL_GPIO_InitTypeDef*
172 Function - LL_GPIO_StructInit void LL_GPIO_InitTypeDef*
173 Function - LL_I2C_DeInit ErrorStatus I2C_TypeDef*
174 Function - + LL_I2C_Init ErrorStatus I2C_TypeDef*, LL_I2C_InitTypeDef*
175 Function - LL_I2C_StructInit void LL_I2C_InitTypeDef*
176 Function - LL_Init1msTick void uint32_t
177 Function - + LL_LPTIM_DeInit ErrorStatus LPTIM_TypeDef*
178 Function - LL_LPTIM_Disable void LPTIM_TypeDef*
179 Function - + LL_LPTIM_Init ErrorStatus LPTIM_TypeDef*, LL_LPTIM_InitTypeDef*
180 Function - LL_LPTIM_StructInit void LL_LPTIM_InitTypeDef*
181 Function - LL_LPUART_DeInit ErrorStatus USART_TypeDef*
182 Function - + LL_LPUART_Init ErrorStatus USART_TypeDef*, LL_LPUART_InitTypeDef*
183 Function - LL_LPUART_StructInit void LL_LPUART_InitTypeDef*
184 Function - LL_PKA_DeInit ErrorStatus PKA_TypeDef*
185 Function - LL_PKA_Init ErrorStatus PKA_TypeDef*, LL_PKA_InitTypeDef*
193 Function - LL_RCC_GetCLK48ClockFreq uint32_t uint32_t
194 Function - LL_RCC_GetI2CClockFreq uint32_t uint32_t
195 Function - LL_RCC_GetLPTIMClockFreq uint32_t uint32_t
196 Function - + LL_RCC_GetLPUARTClockFreq uint32_t uint32_t
197 Function - LL_RCC_GetRFWKPClockFreq uint32_t
198 Function - LL_RCC_GetRNGClockFreq uint32_t uint32_t
199 Function - LL_RCC_GetRTCClockFreq uint32_t
200 Function - LL_RCC_GetSAIClockFreq uint32_t uint32_t
201 Function - LL_RCC_GetSMPSClockFreq uint32_t
202 Function - LL_RCC_GetSystemClocksFreq void LL_RCC_ClocksTypeDef*
203 Function - + LL_RCC_GetUSARTClockFreq uint32_t uint32_t
204 Function - LL_RCC_GetUSBClockFreq uint32_t uint32_t
205 Function - LL_RNG_DeInit ErrorStatus RNG_TypeDef*
206 Function - LL_RNG_Init ErrorStatus RNG_TypeDef*, LL_RNG_InitTypeDef*
212 Function - LL_RTC_DATE_Init ErrorStatus RTC_TypeDef*, uint32_t, LL_RTC_DateTypeDef*
213 Function - LL_RTC_DATE_StructInit void LL_RTC_DateTypeDef*
214 Function - LL_RTC_DeInit ErrorStatus RTC_TypeDef*
215 Function - + LL_RTC_EnterInitMode ErrorStatus RTC_TypeDef*
216 Function - LL_RTC_ExitInitMode ErrorStatus RTC_TypeDef*
217 Function - + LL_RTC_Init ErrorStatus RTC_TypeDef*, LL_RTC_InitTypeDef*
218 Function - LL_RTC_StructInit void LL_RTC_InitTypeDef*
219 Function - LL_RTC_TIME_Init ErrorStatus RTC_TypeDef*, uint32_t, LL_RTC_TimeTypeDef*
220 Function - LL_RTC_TIME_StructInit void LL_RTC_TimeTypeDef*
221 Function - LL_RTC_WaitForSynchro ErrorStatus RTC_TypeDef*
222 Function - LL_SPI_DeInit ErrorStatus SPI_TypeDef*
223 Function - + LL_SPI_Init ErrorStatus SPI_TypeDef*, LL_SPI_InitTypeDef*
224 Function - LL_SPI_StructInit void LL_SPI_InitTypeDef*
225 Function - LL_SetFlashLatency ErrorStatus uint32_t
226 Function - + LL_SetSystemCoreClock void uint32_t
227 Function - LL_TIM_BDTR_Init ErrorStatus TIM_TypeDef*, LL_TIM_BDTR_InitTypeDef*
228 Function - LL_TIM_BDTR_StructInit void LL_TIM_BDTR_InitTypeDef*
229 Function - + LL_TIM_DeInit ErrorStatus TIM_TypeDef*
230 Function - LL_TIM_ENCODER_Init ErrorStatus TIM_TypeDef*, LL_TIM_ENCODER_InitTypeDef*
231 Function - LL_TIM_ENCODER_StructInit void LL_TIM_ENCODER_InitTypeDef*
232 Function - LL_TIM_HALLSENSOR_Init ErrorStatus TIM_TypeDef*, LL_TIM_HALLSENSOR_InitTypeDef*
240 Function - LL_USART_ClockInit ErrorStatus USART_TypeDef*, LL_USART_ClockInitTypeDef*
241 Function - LL_USART_ClockStructInit void LL_USART_ClockInitTypeDef*
242 Function - LL_USART_DeInit ErrorStatus USART_TypeDef*
243 Function - + LL_USART_Init ErrorStatus USART_TypeDef*, LL_USART_InitTypeDef*
244 Function - LL_USART_StructInit void LL_USART_InitTypeDef*
245 Function - LL_mDelay void uint32_t
246 Function - SystemCoreClockUpdate void
1353 Function + furi_thread_get_return_code int32_t FuriThread*
1354 Function + furi_thread_get_stack_space uint32_t FuriThreadId
1355 Function + furi_thread_get_state FuriThreadState FuriThread*
1356 Function + furi_thread_is_suspended _Bool FuriThreadId
1357 Function + furi_thread_join _Bool FuriThread*
1358 Function + furi_thread_mark_as_service void FuriThread*
1359 Function + furi_thread_resume void FuriThreadId
1360 Function + furi_thread_set_callback void FuriThread*, FuriThreadCallback
1361 Function + furi_thread_set_context void FuriThread*, void*
1362 Function + furi_thread_set_name void FuriThread*, const char*
1368 Function + furi_thread_start void FuriThread*
1369 Function + furi_thread_stdout_flush int32_t
1370 Function + furi_thread_stdout_write size_t const char*, size_t
1371 Function + furi_thread_suspend void FuriThreadId
1372 Function + furi_thread_yield void
1373 Function + furi_timer_alloc FuriTimer* FuriTimerCallback, FuriTimerType, void*
1374 Function + furi_timer_free void FuriTimer*

View File

@ -89,7 +89,9 @@ static void furi_thread_body(void* context) {
if(thread->is_service) { if(thread->is_service) {
FURI_LOG_E( FURI_LOG_E(
"Service", "%s thread exited. Thread memory cannot be reclaimed.", thread->name); "Service",
"%s thread exited. Thread memory cannot be reclaimed.",
thread->name ? thread->name : "<unknown service>");
} }
// clear thread local storage // clear thread local storage
@ -515,4 +517,23 @@ size_t furi_thread_stdout_write(const char* data, size_t size) {
int32_t furi_thread_stdout_flush() { int32_t furi_thread_stdout_flush() {
return __furi_thread_stdout_flush(furi_thread_get_current()); return __furi_thread_stdout_flush(furi_thread_get_current());
} }
void furi_thread_suspend(FuriThreadId thread_id) {
TaskHandle_t hTask = (TaskHandle_t)thread_id;
vTaskSuspend(hTask);
}
void furi_thread_resume(FuriThreadId thread_id) {
TaskHandle_t hTask = (TaskHandle_t)thread_id;
if(FURI_IS_IRQ_MODE()) {
xTaskResumeFromISR(hTask);
} else {
vTaskResume(hTask);
}
}
bool furi_thread_is_suspended(FuriThreadId thread_id) {
TaskHandle_t hTask = (TaskHandle_t)thread_id;
return eTaskGetState(hTask) == eSuspended;
}

View File

@ -236,6 +236,25 @@ size_t furi_thread_stdout_write(const char* data, size_t size);
*/ */
int32_t furi_thread_stdout_flush(); int32_t furi_thread_stdout_flush();
/** Suspend thread
*
* @param thread_id thread id
*/
void furi_thread_suspend(FuriThreadId thread_id);
/** Resume thread
*
* @param thread_id thread id
*/
void furi_thread_resume(FuriThreadId thread_id);
/** Get thread suspended state
*
* @param thread_id thread id
* @return true if thread is suspended
*/
bool furi_thread_is_suspended(FuriThreadId thread_id);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif