int main(int argc, char *argv[]) { uint32_t atomic_state; if (cmdline_parser(argc, argv, &args_info) != 0) { exit(1); } hwAlarmInit(); hwRadioInit(); hwRandomInit(); otInit(); sCliServer.Start(); while (1) { otProcessNextTasklet(); atomic_state = otPlatAtomicBegin(); if (!otAreTaskletsPending()) { hwSleep(); } otPlatAtomicEnd(atomic_state); } return 0; }
int main(int argc, char *argv[]) { if (argc != 2) { exit(1); } NODE_ID = atoi(argv[1]); posixPlatformInit(); otInit(); otCliSerialInit(); while (1) { otProcessNextTasklet(); posixPlatformProcessDrivers(); } return 0; }