examples/user/main.c
changeset 1508 60a116ed3897
parent 1363 11c0b2caa253
child 2421 bc2d4bf9cbe5
child 2589 2b9c78543663
--- a/examples/user/main.c	Mon Jul 27 10:37:47 2009 +0000
+++ b/examples/user/main.c	Mon Jul 27 10:44:16 2009 +0000
@@ -92,9 +92,9 @@
 const static ec_pdo_entry_reg_t domain1_regs[] = {
     {AnaInSlavePos,  Beckhoff_EL3102, 0x3101, 1, &off_ana_in_status},
     {AnaInSlavePos,  Beckhoff_EL3102, 0x3101, 2, &off_ana_in_value},
-	{AnaOutSlavePos, Beckhoff_EL4102, 0x3001, 1, &off_ana_out},
-	{DigOutSlavePos, Beckhoff_EL2032, 0x3001, 1, &off_dig_out},
-	{}
+    {AnaOutSlavePos, Beckhoff_EL4102, 0x3001, 1, &off_ana_out},
+    {DigOutSlavePos, Beckhoff_EL2032, 0x3001, 1, &off_dig_out},
+    {}
 };
 
 static unsigned int counter = 0;
@@ -316,13 +316,13 @@
 
 int main(int argc, char **argv)
 {
-	ec_slave_config_t *sc;
+    ec_slave_config_t *sc;
     struct sigaction sa;
     struct itimerval tv;
     
     master = ecrt_request_master(0);
-	if (!master)
-		return -1;
+    if (!master)
+        return -1;
 
     domain1 = ecrt_master_create_domain(master);
     if (!domain1)
@@ -380,7 +380,7 @@
 
     if (ecrt_domain_reg_pdo_entry_list(domain1, domain1_regs)) {
         fprintf(stderr, "PDO entry registration failed!\n");
-		return -1;
+        return -1;
     }
 
     printf("Activating master...\n");
@@ -417,7 +417,7 @@
     }
 
     printf("Started.\n");
-	while (1) {
+    while (1) {
         pause();
 
 #if 0
@@ -430,9 +430,9 @@
             cyclic_task();
             user_alarms++;
         }
-	}
-
-	return 0;
-}
-
-/****************************************************************************/
+    }
+
+    return 0;
+}
+
+/****************************************************************************/