changes to nrf code for xc8