27 lines
340 B
C
27 lines
340 B
C
|
|
#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_item(fun_,index_) \
|
|
__attribute__((used,section(".sys_api"))) static const api_item_struct api_##index_ =\
|
|
{.fun=fun_,.index=index_}
|
|
|
|
|
|
|
|
#endif
|
|
|