Audio added to firmware, Website File handling

This commit is contained in:
2026-04-01 16:06:40 +02:00
parent 01448223ad
commit 947346777f
22 changed files with 951 additions and 123 deletions

View File

@@ -0,0 +1,29 @@
#ifndef EVENT_MGMT_H
#define EVENT_MGMT_H
#include <zephyr/kernel.h>
#define EVENT_MGMT_FS_READY BIT(0)
#define EVENT_MGMT_AUDIO_READY BIT(1)
#define EVENT_MGMT_BLE_CONNECTED BIT(2)
#define EVENT_MGMT_BLE_DISCONNECTED BIT(3)
extern struct k_event event_mgmt_events;
static inline int event_mgmt_wait_for(uint32_t events, k_timeout_t timeout)
{
uint32_t got = k_event_wait(&event_mgmt_events, events, false, timeout);
return (got & events) == events ? 0 : -ETIMEDOUT;
}
static inline void event_mgmt_set_event(uint32_t event)
{
k_event_post(&event_mgmt_events, event);
}
static inline void event_mgmt_clear_event(uint32_t event)
{
k_event_clear(&event_mgmt_events, event);
}
#endif /* EVENT_MGMT_H */