module_entry.c 549 B

123456789101112131415161718192021
  1. #include <rtthread.h>
  2. #include <interface_help.h>
  3. extern int rt_application_entry();
  4. rt_shell_t ishell = RT_NULL;
  5. int rt_module_entry(const void* shell, void** object_info)
  6. {
  7. /* init shell */
  8. ishell = (rt_shell_t)shell;
  9. struct rt_module_info *info = (struct rt_module_info*)rt_malloc(sizeof(struct rt_module_info));
  10. info->module_refs = 0;
  11. info->module_type = RT_Module_Class_APP;
  12. info->module_guid = 0xdead;
  13. info->exec_entry = (void *)rt_application_entry;
  14. info->module_interface = RT_NULL;
  15. *object_info = info;
  16. }