Adding complete initialiation and firmware update logic