Commit 01c8c7cc authored by julien.delange's avatar julien.delange
Browse files

import controller functions



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@618 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 58f29592
......@@ -21,9 +21,9 @@ void __po_hi_c_driver_1553_rasta_init (__po_hi_device_id id);
int __po_hi_c_driver_1553_rasta_sender (const __po_hi_task_id task_id, const __po_hi_port_t port);
void __po_hi_driver_1553_rasta_controller_spg ();
void __po_hi_c_driver_1553_rasta_controller ();
int __po_hi_driver_1553_rasta_proccess_list (__po_hi_c_driver_rasta_1553_brm_t chan, struct bc_msg *list, int test);
int __po_hi_c_driver_1553_rasta_proccess_list (__po_hi_c_driver_rasta_1553_brm_t chan, struct bc_msg *list, int test);
#endif
......
......@@ -140,7 +140,7 @@ int __po_hi_c_driver_1553_rasta_sender (const __po_hi_task_id task_id, const __p
}
int __po_hi_driver_1553_rasta_proccess_list (__po_hi_c_driver_rasta_1553_brm_t chan, struct bc_msg *list, int test)
int __po_hi_c_driver_1553_rasta_proccess_list (__po_hi_c_driver_rasta_1553_brm_t chan, struct bc_msg *list, int test)
{
int j,ret;
......@@ -179,7 +179,7 @@ int __po_hi_driver_1553_rasta_proccess_list (__po_hi_c_driver_rasta_1553_brm_t c
return 0;
}
void __po_hi_driver_1553_rasta_controller_spg ()
void __po_hi_c_driver_1553_rasta_controller ()
{
struct bc_msg cmd_list[__PO_HI_NEED_DRIVER_1553_RASTA_MSG_CNT+1];
struct bc_msg result_list[__PO_HI_NEED_DRIVER_1553_RASTA_MSG_CNT+1];
......@@ -194,7 +194,7 @@ void __po_hi_driver_1553_rasta_controller_spg ()
/* Set BC mode */
__DEBUGMSG("[RASTA 1553] Task1: Setting BC mode\n");
__po_hi_c_driver_1553_rasta_brmlib_set_mode(po_hi_c_driver_1553_rasta_fd,BRM_MODE_BC);
__po_hi_c_driver_1553_rasta_brmlib_set_mode (po_hi_c_driver_1553_rasta_fd,BRM_MODE_BC);
/* total blocking mode */
__DEBUGMSG("[RASTA 1553] Task1: Setting TX/RX blocking mode\n");
......@@ -202,9 +202,6 @@ void __po_hi_driver_1553_rasta_controller_spg ()
__DEBUGMSG("[RASTA 1553] Setting up command list.\n");
/* Begin execution list loop */
while (1)
{
/* Set up messages to RT receive subaddresses */
for (j = 1; j <= __PO_HI_NEED_DRIVER_1553_RASTA_MSG_CNT; j++)
......@@ -247,9 +244,9 @@ void __po_hi_driver_1553_rasta_controller_spg ()
__DEBUGMSG("[RASTA 1553] ------------- BC: START LIST EXECUTION -------------\n");
__DEBUGMSG("[RASTA 1553] Start CMD list processing.\n");
if ( __po_hi_driver_1553_rasta_proccess_list(po_hi_c_driver_1553_rasta_fd,cmd_list,0) ){
if ( __po_hi_c_driver_1553_rasta_proccess_list(po_hi_c_driver_1553_rasta_fd,cmd_list,0) ){
sleep(1);
continue;
return;
}
......@@ -269,10 +266,10 @@ void __po_hi_driver_1553_rasta_controller_spg ()
}
}
if ( __po_hi_driver_1553_rasta_proccess_list(po_hi_c_driver_1553_rasta_fd,result_list,1) )
if ( __po_hi_c_driver_1553_rasta_proccess_list(po_hi_c_driver_1553_rasta_fd,result_list,1) )
{
sleep(1);
continue;
return;
}
/* print the data that was received */
......@@ -298,7 +295,6 @@ void __po_hi_driver_1553_rasta_controller_spg ()
__DEBUGMSG("[RASTA 1553] -----------------------------------------------------\n");
sleep(15);
}
}
......
Supports Markdown
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