void fg_init(void *queue, void (*bs_fuel_gauge_status)(void)) { fg_init_ready = bs_fuel_gauge_status; nm_setup_soc_report(&nm_low_soc_report, &nm_critical_soc_report, &nm_shutdown_soc_report, &battery_config); nm_setup_temp_report(&nm_temp_report, &battery_config); cfw_client_t *client = cfw_client_init(queue, fg_handle_msg, NULL); cfw_open_service_helper(client, FG_SERVICE_ID, fg_service_opened_cb, NULL); }