Integrate companion-chip status into GET /api/health (fw 0.6.0).
Expose Si4684, ADAU1701, and BT1035 boot flags via CompanionChipStatus after HardwareBootstrap; update API manual schema for Slice 8. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -115,4 +115,13 @@ audio::AudioService& HardwareBootstrap::audioService()
|
||||
return gAudioService;
|
||||
}
|
||||
|
||||
core::CompanionChipStatus HardwareBootstrap::companionChipStatus() noexcept
|
||||
{
|
||||
return core::CompanionChipStatus{
|
||||
.si4684Ready = gSi4684.isBooted(),
|
||||
.adau1701Ready = gAdau1701.isBooted(),
|
||||
.bt1035Ready = gBt1035.isBooted(),
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace hardware
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "core/CompanionChipStatus.hpp"
|
||||
|
||||
#include <expected>
|
||||
|
||||
namespace audio {
|
||||
@@ -94,6 +96,18 @@ public:
|
||||
* @date 2026-07-06
|
||||
*/
|
||||
[[nodiscard]] static audio::AudioService& audioService();
|
||||
|
||||
/**
|
||||
* @brief companionChipStatus — snapshot of companion-chip boot flags.
|
||||
*
|
||||
* @dname companionChipStatus
|
||||
* @return Ready flags for Si4684, ADAU1701, BT1035.
|
||||
* @pubstate reads static driver isBooted() after boot().
|
||||
*
|
||||
* @author Michele Bigi
|
||||
* @date 2026-07-06
|
||||
*/
|
||||
[[nodiscard]] static core::CompanionChipStatus companionChipStatus() noexcept;
|
||||
};
|
||||
|
||||
} // namespace hardware
|
||||
|
||||
@@ -61,7 +61,8 @@ extern "C" void app_main()
|
||||
static secure_store::NvsSecureStore store;
|
||||
|
||||
auto netResult = net::NetBootstrap::start(
|
||||
store, tunerService, hardware::HardwareBootstrap::audioService());
|
||||
store, tunerService, hardware::HardwareBootstrap::audioService(),
|
||||
hardware::HardwareBootstrap::companionChipStatus());
|
||||
if (!netResult) {
|
||||
ESP_LOGE(kTag, "network bootstrap failed");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user