Improve main.c template for wizard.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 13:10:51 +0000 (13:10 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 13:10:51 +0000 (13:10 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2796 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/srctemplates/main.c

index 0a2fa1ab521d1fa3b78727f5ef1cfa9c5276522b..7ecafb863d7eac8259d22ea2e9ded962151e61c0 100644 (file)
@@ -1,7 +1,20 @@
 // Emtpy main.c file generated by the wizard
+#include <cpu/irq.h>
+
+static void init(void)
+{
+       IRQ_ENABLE;
+       // insert initialization calls here
+}
 
 int main(void)
 {
-    return 0;
+       init();
+       while (1)
+       {
+               // your code goes here
+       }
+
+       return 0;
 }