Commit b13278b8 authored by Quentin Genoud's avatar Quentin Genoud

modify hal to run on AFCZ

parent 0d8ffce5
Pipeline #5245 failed with stage
in 6 seconds
......@@ -157,13 +157,13 @@ static int hal_init(void)
/* Initialize IPC/RPC - see hal_ports.c */
assert_init(hal_port_wripc_init(logfilename));
/* While we are leaving initialization function, there might be
still LPDC tx calibation ongoing - this is still initialization.
The status LED is set to green once the LPDC tx calibration is
completed. This is done in hal_port_fms_tx.c, whenit is detected
that all the ports have been calibrated (i.e. in the
port_tx_setup_fsm_state_done state.*/
port_tx_setup_fsm_state_done state.*/
if (daemon_mode)
hal_daemonize();
......@@ -263,11 +263,13 @@ static void cb_timer_update_fan(int timerId) {
/* Update fans and get temperatures values. Don't write
* temperatures directly to the shmem to reduce the
* critical section of shmem */
#if 0
shw_update_fans(&temp_sensors);
wrs_shm_write(hal_shmem_hdr, WRS_SHM_WRITE_BEGIN);
memcpy(&hal_shmem->temp, &temp_sensors,
sizeof(temp_sensors));
wrs_shm_write(hal_shmem_hdr, WRS_SHM_WRITE_END);
#endif
}
static void cb_timer_update_all(int timerId) {
......@@ -311,7 +313,6 @@ int main(int argc, char *argv[])
* port and fan update every UPDATE_FAN_PERIOD. There still
* is some jitter from hal_update_wripc() timing.
*/
for (;;) {
hal_wripc_update(25 /* max ms delay */);
......@@ -320,7 +321,7 @@ int main(int argc, char *argv[])
if ( hal_shmem->shmemState== HAL_SHMEM_STATE_INITITALIZING) {
// Check if all ports have been initialized
if ( hal_port_all_ports_initialized())
if ( hal_port_all_ports_initialized() )
hal_shmem->shmemState= HAL_SHMEM_STATE_INITITALIZED;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment