TB2026-YDS Firmware
Loading...
Searching...
No Matches
maintenance.c File Reference

Maintenance task: periodically runs background chores (volume/player polls, power_tick, autonomy_tick, SD hot-plug watch, idle auto power-off, diag). More...

#include "maintenance.h"
#include "power.h"
#include "volume.h"
#include "player.h"
#include "playlist.h"
#include "storage.h"
#include "sdcard.h"
#include "input.h"
#include "autonomy.h"
#include "diag.h"
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"

Macros

#define MAINT_TASK_PRIO   3 /* below input (5) and the audio task (22) */
#define MAINT_TASK_STACK   3072 /* fuel_gauge_read does a burst of I2C reads */
#define MAINT_VOL_MS   100 /* volume knob poll rate */
#define MAINT_PWR_DIV   20 /* power_tick every 2000 ms */
#define MAINT_SD_DIV   5 /* card-detect sample every 500 ms */

Functions

esp_err_t maintenance_init (void)
 Start the maintenance task.

Detailed Description

Maintenance task: periodically runs background chores (volume/player polls, power_tick, autonomy_tick, SD hot-plug watch, idle auto power-off, diag).

Note
Développé avec l'assistance de Claude Opus 4.8 (Anthropic), sous la direction de Y. Dos Santos : spécification, revue et validation sur cible par l'auteur.

Macro Definition Documentation

◆ MAINT_PWR_DIV

#define MAINT_PWR_DIV   20 /* power_tick every 2000 ms */

◆ MAINT_SD_DIV

#define MAINT_SD_DIV   5 /* card-detect sample every 500 ms */

◆ MAINT_TASK_PRIO

#define MAINT_TASK_PRIO   3 /* below input (5) and the audio task (22) */

◆ MAINT_TASK_STACK

#define MAINT_TASK_STACK   3072 /* fuel_gauge_read does a burst of I2C reads */

◆ MAINT_VOL_MS

#define MAINT_VOL_MS   100 /* volume knob poll rate */