Files
player/Project/Src/MY/sys_api.h

19 lines
388 B
C
Raw Normal View History

2025-06-27 00:32:57 +08:00
#ifndef sys_api_h__
#define sys_api_h__
#include "stddef.h"
2025-06-27 00:32:57 +08:00
#include "stdint.h"
#include "stdlib.h"
typedef struct {
void *fun;
int index;
} api_item_struct;
2025-07-06 02:53:08 +08:00
#define api_item(fun_, index_) \
__attribute__((used, section(".sys_api"))) static const api_item_struct \
api_##index_ = {.fun = fun_, .index = index_}
2025-07-06 02:53:08 +08:00
2025-06-27 00:32:57 +08:00
#endif