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

30 lines
469 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_)\
2025-06-28 18:16:25 +08:00
__attribute__((used)) static const void *name_[size_] __attribute__((section("sys_api")))
2025-06-27 00:32:57 +08:00
#define api_item(fun_,index_) \
2025-07-06 02:53:08 +08:00
__attribute__((used,section(".sys_api"))) static const api_item_struct api_##index_ =\
2025-06-27 00:32:57 +08:00
{.fun=fun_,.index=index_}
2025-07-06 02:53:08 +08:00
2025-06-27 00:32:57 +08:00
#endif