chore: migrate project into clean repository

This commit is contained in:
yuuux
2026-08-13 16:50:52 +08:00
commit d1d25a09e7
27405 changed files with 9422808 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# 添加该目录到主库的包含路径
listenai_include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)
target_sources(${TARGET_NAME} PRIVATE
./lisaui_sys_events.c
)

View File

@@ -0,0 +1,21 @@
#include "lisaui_type.h"
#include "lisaui_sys_events.h"
#include "ebus/ebus.h"
lisaui_err_t lisaui_sys_events_init(void){
ebus_handle_t *bus;
ebus_chn_t *chn;
// Create bus
bus = ebus_create(LISAUI_BUS_NAME);
if (bus == NULL) {
return -1;
}
// Create wordbook channel
chn = ebus_chn_create_attach(bus, LISAUI_SYSTEM_NOTIFY_CHANNEL_NAME);
if (chn == NULL) {
return -1;
}
return LISAUI_ERR_OK;
}

View File

@@ -0,0 +1,36 @@
/**
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __LISAUI_SYS_EVENTS_H__
#define __LISAUI_SYS_EVENTS_H__
#include "ebus/ebus.h"
#ifdef __cplusplus
extern "C" {
#endif
#define LISAUI_BUS_NAME "lisaui"
#define LISAUI_SYSTEM_NOTIFY_CHANNEL_NAME "system_notify"
#define LISAUI_SYS_EVENT_CHECKED_BUTTON_HOME (1 << 0)
#define LISAUI_SYS_EVENT_CHECKED_BUTTON_BACK (1 << 1)
#define LISAUI_SYS_EVENT_CHECKED_BUTTON_CLOSE (1 << 2)
typedef struct{
uint32_t events;
uint32_t payload_len;
void *payload;
}lisaui_sys_event_message_t;
#define LISAUI_SYS_EVENT_MESSAGE_DEFINE_DEFAULT(message,event)\
lisaui_sys_event_message_t message = {\
.events = event,\
.payload_len = 0,\
.payload = NULL\
};
#ifdef __cplusplus
}
#endif
#endif /* __LISAUI_SYS_EVENTS_H__ */