Digital I/O event generator

The objective is to rework the digital I/O module to integrate the MCP23008 GPIO expander and include functionality to debounce the different inputs.

Debouncer

The debouncer will work by creating small time delays to wait until the device can give a steady value. We may be able to look into decreasing interrupt priority for some of the input devices

GPIO Expander

Data from the devices attached to the expander will be obtained through an interrupt-based model. The MCP23008 has a special interrupt capture register that records the input value of each device once an interrupt occurs. The data stored in this register will not be changed until it is read by a master, which will clear the interrupt. Because of this, the input value held in the interrupt capture register will not be affected by bouncing, so a debouncer for the steering wheel input may not be necessary, although some investigation may be required to confirm this.

However, since the GPIO module uses a different input callback function than the GPIO Expander module, the initialization for digital I/O must be modified to separate steering wheel and non-steering wheel inputs.