00001 00009 /* Includes */ 00010 #include "user_config.h" 00011 00017 static ESOS_USER_TASK(heartbeat) { 00018 ESOS_TASK_BEGIN(); 00019 while (TRUE) { 00020 ESOS_TASK_WAIT_TICKS(HALF_HEARTBEAT_PERIOD); 00021 HEARTBEAT = !HEARTBEAT; //toggle the HEARTBEAT LED 00022 } 00023 ESOS_TASK_END(); 00024 } 00025 00026 /* 00027 * This function is called by ESOS during initialization. From here, you may call 00028 * any initialization functions you want. The developer can make no assumptions about 00029 * task scheduling or timing. 00030 */ 00031 void user_init(void) { 00032 CONFIG_HEARTBEAT(); //HEARTBEAT is RB15, set as digital output 00033 esos_RegisterTask(heartbeat); 00034 }