| // Copyright 2025 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.hardware.google.nanohub; |
| |
| /// Events related to the lifecycle of the MCU. |
| type LifecycleEvent = flexible enum { |
| /// Indicates the MCU is not currently configured. |
| UNCONFIGURED = 0; |
| /// Indicates the MCU is starting up. |
| START = 1; |
| /// Indicates the MCU is ready to accept commands and data. |
| READY = 2; |
| /// Indicates the MCU is shutting down. |
| SHUTDOWN = 3; |
| }; |
| |
| /// Observer interface for lifecycle events. |
| closed protocol LifecycleObserver { |
| /// Called when the lifecycle state changes. |
| strict -> OnLifecycleChange(struct { |
| event LifecycleEvent; |
| }); |
| }; |