/* Helper function to check if in DFU app state.  */
static bool dfu_check_app_state(void)
/* Helper function to check if in DFU app state.  */
static bool dfu_check_app_state(void)
{
	if (dfu_data.state == appIDLE ||
	    dfu_data.state == appDETACH) {
		dfu_data.state = appIDLE;
		return true;
	}
	return false;
}