app_descriptor

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sunlei0625/article/details/62421391
 
/* each app needs to define one of these to define its startup conditions */
struct app_descriptor {
    const char *name;
    app_init  init;
    app_entry entry;
    unsigned int flags;
    size_t stack_size;
};

typedef void (*app_init)(const struct app_descriptor *); typedef void (*app_entry)(const struct app_descriptor *, void *args);

/* app startup flags */ #define APP_FLAG_DONT_START_ON_BOOT 0x1 #define APP_FLAG_CUSTOM_STACK_SIZE 0x2

#define APP_START(appname) const struct app_descriptor _app_##appname __ALIGNED(sizeof(void *)) __SECTION(".apps") = { .name = #appname,

#define APP_END };

 
 
APP_START(shell)
.init = shell_init,
 .entry = shell_entry,
  APP_END
 
APP_START(pcitests)
APP_END
 
APP_START(ndebugtest)
  .entry = ndebugtest_entry,
APP_END
 
APP_START(moot)
 .init = moot_init,
 .entry = moot_entry,
APP_END
 
APP_START(usbtest)
 .init = mdebug_init,
 .entry = mdebug_entry,
APP_END
 
APP_START(usbtest)
 .init = lpcboot_init,
 .entry = lpcboot_entry,
APP_END
 
APP_START(lkboot)
    .entry = lkboot_task,
    .flags = 0,
APP_END
APP_START(inetsrv)
.init = inetsrv_init,
 .entry = inetsrv_entry,
  .flags = 0,
   APP_END
 
展开阅读全文

没有更多推荐了,返回首页