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

30 lines
494 B
C
Raw Normal View History

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