- 创建了项目的基本目录结构和文件 - 添加了 CMakeLists.txt 和 Makefile 构建配置 - 创建了 main.c 文件,实现了简单的 LED 闪烁和按键检测功能 - 集成了 SEGGER RTT 库 - 添加了 .gitignore 文件,排除了不必要的生成文件
25 lines
632 B
C
25 lines
632 B
C
#ifndef __GE_INPUT_H__
|
|
#define __GE_INPUT_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
struct ge_input;
|
|
typedef struct ge_input ge_input_t;
|
|
typedef union ge_input_event {
|
|
void* ctx;
|
|
uintptr_t num;
|
|
} ge_input_event_t;
|
|
|
|
typedef int(*ge_input_send_func_t)(ge_input_t* ctx, ge_input_event_t event);
|
|
typedef int(*ge_input_peek_func_t)(ge_input_t* ctx, ge_input_event_t* event);
|
|
typedef int(*ge_input_recv_func_t)(ge_input_t* ctx, ge_input_event_t* event);
|
|
|
|
struct ge_input {
|
|
void* context;
|
|
ge_input_send_func_t func_send;
|
|
ge_input_peek_func_t func_peek;
|
|
ge_input_recv_func_t func_recv;
|
|
};
|
|
|
|
#endif // __GE_INPUT_H__
|