File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -922,6 +922,8 @@ obj-$(CONFIG_DEBOUNCE) += debounce.o
922922debounce-objs := hal/components/debounce.o $(MATHSTUB )
923923obj-$(CONFIG_ENCODER) += encoder.o
924924encoder-objs := hal/components/encoder.o $(MATHSTUB )
925+ obj-$(CONFIG_ENUM) += enum.o
926+ enum-objs := hal/components/enum.o $(MATHSTUB )
925927obj-$(CONFIG_COUNTER) += counter.o
926928counter-objs := hal/components/counter.o $(MATHSTUB )
927929obj-$(CONFIG_ENCODER_RATIO) += encoder_ratio.o
@@ -1267,6 +1269,7 @@ endif
12671269../rtlib/boss_plc$(MODULE_EXT ) : $(addprefix objects/rt,$(boss_plc-objs ) )
12681270../rtlib/debounce$(MODULE_EXT ) : $(addprefix objects/rt,$(debounce-objs ) )
12691271../rtlib/encoder$(MODULE_EXT ) : $(addprefix objects/rt,$(encoder-objs ) )
1272+ ../rtlib/enum$(MODULE_EXT ) : $(addprefix objects/rt,$(enum-objs ) )
12701273../rtlib/counter$(MODULE_EXT ) : $(addprefix objects/rt,$(counter-objs ) )
12711274../rtlib/encoder_ratio$(MODULE_EXT ) : $(addprefix objects/rt,$(encoder_ratio-objs ) )
12721275../rtlib/stepgen$(MODULE_EXT ) : $(addprefix objects/rt,$(stepgen-objs ) )
Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ CONFIG_BLOCKS=m
180180CONFIG_BOSS_PLC=m
181181CONFIG_DEBOUNCE=m
182182CONFIG_ENCODER=m
183+ CONFIG_ENUM=m
183184CONFIG_COUNTER=m
184185CONFIG_ENCODER_RATIO=m
185186CONFIG_STEPGEN=m
Original file line number Diff line number Diff line change @@ -65,7 +65,6 @@ static void decode(void *inst, long period);
6565static void encode (void * inst , long period );
6666
6767int rtapi_app_main (void ){
68- int num_chans ;
6968 int i , j , v ;
7069 int retval ;
7170 char * token ;
@@ -191,7 +190,6 @@ int rtapi_app_main(void){
191190
192191static void decode (void * v_inst , long period ){;
193192 enum_inst_t * inst = v_inst ;
194- static int once = 0 ;
195193 for (int i = 1 ; i <= inst -> num_pins ; i ++ ){
196194 if (* (inst -> hal [0 ].en ) == * (inst -> hal [i ].en )){
197195 * (inst -> hal [i ].bit ) = 1 ;
You can’t perform that action at this time.
0 commit comments