mirror of
https://github.com/m5stack/StackChan.git
synced 2026-04-27 11:02:40 +00:00
5001b7081b
* add firmware source code
50 lines
929 B
C++
50 lines
929 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
#pragma once
|
|
#include "stackchan_camera.h"
|
|
#include <lvgl.h>
|
|
#include <driver/i2c_master.h>
|
|
#include <string_view>
|
|
|
|
namespace hal_bridge {
|
|
|
|
struct TouchPoint_t {
|
|
int num = 0;
|
|
int x = -1;
|
|
int y = -1;
|
|
};
|
|
|
|
struct Data_t {
|
|
TouchPoint_t touchPoint;
|
|
bool isXiaozhiMode = false;
|
|
};
|
|
|
|
void lock();
|
|
void unlock();
|
|
Data_t& get_data();
|
|
|
|
void set_touch_point(int num, int x, int y);
|
|
TouchPoint_t get_touch_point();
|
|
|
|
bool is_xiaozhi_mode();
|
|
void set_xiaozhi_mode(bool mode);
|
|
|
|
void disply_lvgl_lock();
|
|
void disply_lvgl_unlock();
|
|
lv_disp_t* display_get_lvgl_display();
|
|
void display_setup_xiaozhi_ui();
|
|
|
|
void xiaozhi_board_init();
|
|
void start_xiaozhi_app();
|
|
|
|
i2c_master_bus_handle_t board_get_i2c_bus();
|
|
|
|
StackChanCamera* board_get_camera();
|
|
|
|
void app_play_sound(const std::string_view& sound);
|
|
|
|
} // namespace hal_bridge
|