void main() { sys_init(); dps_init(); led_flash(LED_RED); lv_enable(0); printf("dps v1.0, SW: %s %s\n\r", __DATE__, __TIME__); while(1){ sys_update(); } }
jresult_t dps_app_init(ptp_instanceh_t insth) { dps_callbacks_t dps_cbs; jresult_t rc = 0; j_memset(&app_ctx.jconfig, 0, sizeof(dps_job_config_t)); dps_init_storage(); dps_cbs.printer_connect_h = handle_printer_connect; dps_cbs.printer_estab_h = handle_printer_established; dps_cbs.printer_disconnect_h = handle_printer_disconnect; /* Print client action callbacks */ dps_cbs.config_print_service_complete = config_complete; dps_cbs.start_job_complete = NULL; dps_cbs.abort_job_complete = NULL; dps_cbs.continue_job_complete = NULL; dps_cbs.get_capability_complete = get_cap_complete; dps_cbs.get_job_status_complete = job_stat_complete; dps_cbs.get_device_status_complete = dev_stat_complete; /* Print client event callbacks */ dps_cbs.notify_job_status_h = handle_notify_job_status; dps_cbs.notify_device_status_h = handle_notify_device_status; dps_cbs.get_file_id_h = handle_get_file_id; /* Initialize the DPS layer */ rc = dps_init(insth, &dps_cbs, (dps_appctx_t)&app_ctx, &app_ctx.dpsh); if (rc) { DBG_E(DSLAVE_SICD, ("dps_app_init: failed to register DPS (%d)\n", rc)); } return rc; }