The code can now be used with or without the lirc_rpi kernel module