Core firmware to tie in all of the other libraries.
Before initializing the Digital Dash, verify that the callbacks and hardware ties are properly set. The hardware ties can be found in the Ford Focus Digital Dash Motherboard section.
See function callbacks for instructions on how to configure the hardware level access.
/* Declare a temp config */
DIGITALDASH_CONFIG config;
config.dd_ecu_tx = &ECU_CAN_Tx;
config.dd_fan_ctrl = &Fan_Control;
config.dd_get_sd_card_state = &Get_SD_Card_State;
config.dd_host_ctrl = &Pi_Power;
config.dd_ke_tx = &Rasp_Pi_Tx;
config.dd_set_backlight = &LCD_Brightness;
config.dd_usb = &USB_Power;
config.dd_filter = &Add_CAN_Filter;
The Digital Dash will not start the boot sequence until the system has been properly initialized with the correct callback funtions.
Next the Digital Dash will query the hardware to see if there is an SD card present. If so, it will continue the boot up sequence. Note, that this can be bypassed by removing #define SD_CARD_ACTIVE. The main reason to remove this step would be if the Raspberry Pi Compute has a eMMC.
Everything is configured, at this point the library will enable the Raspberry Pi power domains and set a timer to monitor that the system boots as expected. If not, it will power cycle the system.
Now that the Raspberry Pi is booted, the GUI software is able to request data from the Digital Dash Motherboard such as firmware version or a new data stream. The data aquisition libraries are serviced during normal operation and will handle all of the processing. Lib_digital_dash is meant to be a link between all of these libraries.