Control, limit, safety door and probe input are now managed through IRQ, no debounce for control input but that can easily be added. Safety door and probe are managed through a digital SR latch as discussed and seems to work fine. I couldn't try the probing though, only tested with a terminal and ? report.
The SR latch could also easily be added to all input.
Regarding the inversion of pin signal, I have not done the same thing as the other drivers. In other drivers, the pull up disable is XORed with the invert but I don't really see the point of that. F.ex when using an active proximity sensor, you would disable the pull up but that doesn't mean that the signal has to be inverted. Anyway I can modify my code to align with other driver if needed, let me know.
I have used the inover / outover function of the Pico to invert the signal between the pad and peripheral so I always check for the signal being "normal" (not inverted) and don't do any invert computation on the signal, only the config of the signal during the setting change.
For info, as the code is right now I get an error in usb_serial.c for #define "tusb.h" : No such file or directory
also for eeprom_xxx.c, I have to had ../driver.h to compile
USB wasn't working for me so I commented the #define USB_SERIAL_CDC in driver,h so you can ignore my change and also the #define ENABLE_SAFETY_DOOR_INPUT_PIN in config.h.
I made a bit of cleaning in generic_map, removed all the PORT define that are not needed for the pico.
I kept the outmode as these can be used for IO expander if needed.
Control, limit, safety door and probe input are now managed through IRQ, no debounce for control input but that can easily be added. Safety door and probe are managed through a digital SR latch as discussed and seems to work fine. I couldn't try the probing though, only tested with a terminal and ? report. The SR latch could also easily be added to all input.
Regarding the inversion of pin signal, I have not done the same thing as the other drivers. In other drivers, the pull up disable is XORed with the invert but I don't really see the point of that. F.ex when using an active proximity sensor, you would disable the pull up but that doesn't mean that the signal has to be inverted. Anyway I can modify my code to align with other driver if needed, let me know. I have used the inover / outover function of the Pico to invert the signal between the pad and peripheral so I always check for the signal being "normal" (not inverted) and don't do any invert computation on the signal, only the config of the signal during the setting change.
For info, as the code is right now I get an error in usb_serial.c for #define "tusb.h" : No such file or directory also for eeprom_xxx.c, I have to had ../driver.h to compile
USB wasn't working for me so I commented the #define USB_SERIAL_CDC in driver,h so you can ignore my change and also the #define ENABLE_SAFETY_DOOR_INPUT_PIN in config.h. I made a bit of cleaning in generic_map, removed all the PORT define that are not needed for the pico. I kept the outmode as these can be used for IO expander if needed.