All pastes #189110 Raw Edit

Stuff

public text v1 · immutable
#189110 ·published 2006-10-02 20:47 UTC
rendered paste body
Index: hal/components/stepgen.c
===================================================================
RCS file: /cvs/emc2/src/hal/components/stepgen.c,v
retrieving revision 1.38
diff -u -p -u -r1.38 stepgen.c
--- hal/components/stepgen.c	1 Oct 2006 21:24:32 -0000	1.38
+++ hal/components/stepgen.c	2 Oct 2006 20:47:38 -0000
@@ -321,7 +321,7 @@ typedef struct {
     unsigned char state;	/* current position in state table */
     unsigned char cycle_max;	/* cycle length for step types 2 and up */
     unsigned char num_phases;	/* number of phases for types 2 and up */
-    unsigned char *lut;		/* pointer to lookup table */
+    const unsigned char *lut;	/* pointer to lookup table */
 } st2_t;
 
 typedef struct {
@@ -1055,7 +1055,7 @@ static int export_stepgen(int num, stepg
 	addr->wd.st2.state = 0;
 	addr->wd.st2.cycle_max = cycle_len_lut[step_type - 2] - 1;
 	addr->wd.st2.num_phases = num_phases_lut[step_type - 2];
-	addr->wd.st2.lut = (char *) (&(master_lut[step_type - 2][0]));
+	addr->wd.st2.lut = &(master_lut[step_type - 2][0]);
 	/* export pins for output phases */
 	for (n = 0; n < addr->wd.st2.num_phases; n++) {
 	    rtapi_snprintf(buf, HAL_NAME_LEN, "stepgen.%d.phase-%c",