don't perform unnecessary write/read cycles, adapt define to STM32_IRMP