int main(void) { platform_init(); Rgb_IO_Pull_Down(); gpio_button_ctrl_init(); ad_button_init(); component_main(); return 0; }
/* The entry point for a flattened (single address space) binary. We are * expecting to be passed a function pointer of the entry point of the * component that we (the current thread) are meant to operate within. */ int main(int thread_id, int (*component_main)(int thread_id)) { return component_main(thread_id); }
/* The entry point for a flattened (single address space) binary. We are * expecting to be passed a function pointer of the entry point of the * component that we (the current thread) are meant to operate within. */ int main(int argc, char *argv[]) { int thread_id = (int)(argv[1]); int (*component_main)(int) = (int (*)(int))(argv[2]); return component_main(thread_id); }