mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
ble: profile rework (#3272)
* ble: profile rework, initial * apps: hid: fix for pairing cleanup * app: hid: select transport based on #define * fixing PVS warnings * ble: serial service: fixed uid naming * bt service: on-demand dialog init; ble profiles: docs; battery svc: proper update * Added shci_cmd_resp_wait/shci_cmd_resp_release impl with semaphore * app: hid: separated transport code * ble: fixed service init order for serial svc; moved hardfault check to ble_glue * cli: ps: added thread prio to output, fixed heap display * ble_glue: naming changes; separate thread for event processing; * furi: added runtime stats; cli: added cpu% to `ps` * cli: fixed thread time calculation * furi: added getter for thread priority * fixing pvs warnings * hid profile: fixed naming * more naming fixes * hal: ble init small cleanup * cleanup & draft beacon api * f18: api sync * apps: moved example_custom_font from debug to examples * BLE extra beacon demo app * naming fix * UI fixes for demo app (wip) * desktop, ble svc: added statusbar icon for beacon * minor cleanup * Minor cleanup & naming fixes * api sync * Removed stale header * hal: added FURI_BLE_EXTRA_LOG for extra logging; comments & code cleanup * naming & macro fixes * quick fixes from review * Eliminated stock svc_ctl * cli: ps: removed runtime stats * minor include fixes * (void) * naming fixes * More naming fixes * fbt: always build all libs * fbt: explicitly globbing libs; dist: logging SDK path * scripts: fixed lib path precedence * hal: bt: profiles: naming changes, support for passing params to a profile; include cleanup * ble: hid: added parameter processing for profile template * api sync * BLE HID: long name trim * Removed unused check * desktop: updated beacon status icon; ble: hid: cleaner device name management * desktop: updated status icon Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: nminaylov <nm29719@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "cli_commands.h"
|
||||
#include "cli_command_gpio.h"
|
||||
|
||||
#include <core/thread.h>
|
||||
#include <furi_hal.h>
|
||||
#include <furi_hal_info.h>
|
||||
#include <task_control_block.h>
|
||||
@@ -388,27 +389,30 @@ void cli_command_ps(Cli* cli, FuriString* args, void* context) {
|
||||
|
||||
const uint8_t threads_num_max = 32;
|
||||
FuriThreadId threads_ids[threads_num_max];
|
||||
uint8_t thread_num = furi_thread_enumerate(threads_ids, threads_num_max);
|
||||
uint32_t thread_num = furi_thread_enumerate(threads_ids, threads_num_max);
|
||||
printf(
|
||||
"%-20s %-20s %-14s %-8s %-8s %s\r\n",
|
||||
"%-17s %-20s %-5s %-13s %-6s %-8s %s\r\n",
|
||||
"AppID",
|
||||
"Name",
|
||||
"Prio",
|
||||
"Stack start",
|
||||
"Heap",
|
||||
"Stack",
|
||||
"Stack min free");
|
||||
for(uint8_t i = 0; i < thread_num; i++) {
|
||||
TaskControlBlock* tcb = (TaskControlBlock*)threads_ids[i];
|
||||
size_t thread_heap = memmgr_heap_get_thread_memory(threads_ids[i]);
|
||||
printf(
|
||||
"%-20s %-20s 0x%-12lx %-8zu %-8lu %-8lu\r\n",
|
||||
"%-17s %-20s %-5d 0x%-11lx %-6zu %-8lu %-8lu\r\n",
|
||||
furi_thread_get_appid(threads_ids[i]),
|
||||
furi_thread_get_name(threads_ids[i]),
|
||||
furi_thread_get_priority(threads_ids[i]),
|
||||
(uint32_t)tcb->pxStack,
|
||||
memmgr_heap_get_thread_memory(threads_ids[i]),
|
||||
thread_heap == MEMMGR_HEAP_UNKNOWN ? 0u : thread_heap,
|
||||
(uint32_t)(tcb->pxEndOfStack - tcb->pxStack + 1) * sizeof(StackType_t),
|
||||
furi_thread_get_stack_space(threads_ids[i]));
|
||||
}
|
||||
printf("\r\nTotal: %d", thread_num);
|
||||
printf("\r\nTotal: %lu", thread_num);
|
||||
}
|
||||
|
||||
void cli_command_free(Cli* cli, FuriString* args, void* context) {
|
||||
|
||||
Reference in New Issue
Block a user