mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Filesystem: add support for @SYS/dma.txt for DMA contention
This commit is contained in:
parent
cf2602f91d
commit
32edb6d0cd
@ -33,6 +33,7 @@ struct SysFileList {
|
||||
static const SysFileList sysfs_file_list[] = {
|
||||
{"threads.txt", 1024},
|
||||
{"tasks.txt", 6500},
|
||||
{"dma.txt", 1024},
|
||||
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
|
||||
{"can_log.txt", 1024},
|
||||
{"can0_stats.txt", 1024},
|
||||
@ -98,6 +99,12 @@ int AP_Filesystem_Sys::open(const char *fname, int flags)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strcmp(fname, "dma.txt") == 0) {
|
||||
r.data->data = (char *)malloc(max_size);
|
||||
if (r.data->data) {
|
||||
r.data->length = hal.util->dma_info(r.data->data, max_size);
|
||||
}
|
||||
}
|
||||
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
|
||||
int8_t can_stats_num = -1;
|
||||
if (strcmp(fname, "can_log.txt") == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user