Commit eae1fd47 authored by jdelange's avatar jdelange

* drivers/*

   - Update drivers source so that they declare 
     their sending function during initialization



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@4904 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent f967c6bf
......@@ -349,6 +349,9 @@ void __po_hi_c_driver_eth_leon_init (__po_hi_device_id id)
leon_eth_device_id = id;
__po_hi_transport_set_sending_func (leon_eth_device_id, __po_hi_c_driver_eth_leon_sender);
for (node = 0 ; node < __PO_HI_NB_DEVICES ; node++)
{
nodes[node].socket = -1;
......
......@@ -108,6 +108,8 @@ void __po_hi_c_driver_serial_leon_init_sender (__po_hi_device_id id)
return;
}
__po_hi_transport_set_sending_func (id, __po_hi_c_driver_serial_leon_sender);
if (__po_hi_c_driver_serial_common_get_speed (id) != __PO_HI_DRIVER_SERIAL_COMMON_SPEED_38400)
{
__PO_HI_DEBUG_INFO ("[LEON SERIAL] This driver handles only a speed of 38400, exiting initialization !\n");
......@@ -170,6 +172,7 @@ void __po_hi_c_driver_serial_leon_init_receiver (__po_hi_device_id id)
serialconf = (__po_hi_c_serial_conf_t*)__po_hi_get_device_configuration (id);
if (serialconf == NULL)
{
__PO_HI_DEBUG_INFO ("[LEON SERIAL] Cannot get the configuration of the device !\n");
......
......@@ -5,7 +5,7 @@
*
* For more informations, please visit http://ocarina.enst.fr
*
* Copyright (C) 2010, European Space Agency (ESA).
* Copyright (C) 2010-2012, European Space Agency (ESA).
*/
#include <drivers/po_hi_driver_linux_serial.h>
......@@ -127,6 +127,8 @@ void __po_hi_c_driver_serial_linux_init_sender (__po_hi_device_id id)
__PO_HI_DEBUG_INFO ("[LINUX SERIAL] Init sender\n");
__po_hi_transport_set_sending_func (id, __po_hi_c_driver_serial_linux_sender);
serialconf = (__po_hi_c_serial_conf_t*)__po_hi_get_device_configuration (id);
if (serialconf == NULL)
......
......@@ -3,7 +3,7 @@
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* Copyright (C) 2010-2011, European Space Agency
* Copyright (C) 2010-2012, European Space Agency
*/
/*! \file po_hi_driver_rasta_serial.c
......@@ -135,6 +135,8 @@ void __po_hi_c_driver_serial_rasta_init (__po_hi_device_id id)
return;
}
__po_hi_transport_set_sending_func (id, __po_hi_c_driver_serial_rasta_sender);
/* provide the spacewire driver with AMBA Plug&Play
* info so that it can find the GRSPW cores.
*/
......
......@@ -3,7 +3,7 @@
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* Copyright (C) 2010, European Space Agency
* Copyright (C) 2010-2012, European Space Agency
*/
#include <deployment.h>
......@@ -109,6 +109,8 @@ void __po_hi_c_driver_spacewire_rasta_init (__po_hi_device_id id)
__po_hi_c_driver_rasta_common_init ();
__po_hi_transport_set_sending_func (id, __po_hi_c_driver_spacewire_rasta_sender);
__PO_HI_DEBUG_DEBUG ("[RASTA SPACEWIRE] Open spacewire device %s ...", drv_conf->devname);
po_hi_c_driver_rasta_spacewire_fd[id] = open (drv_conf->devname, O_RDWR);
......
......@@ -3,7 +3,7 @@
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* Copyright (C) 2011, European Space Agency
* Copyright (C) 2011-2012, European Space Agency
*/
#include <deployment.h>
......@@ -186,6 +186,9 @@ void __po_hi_c_driver_spw_usb_brick_init (__po_hi_device_id id)
/* Get the first device connected */
__po_hi_c_driver_usb_brick_fd[id] = USBSpaceWire_ListDevices();
__po_hi_transport_set_sending_func (id, __po_hi_c_driver_spw_usb_brick_sender);
__po_hi_c_driver_usb_brick_port[id] = 1;
if (strncmp (drv_conf->devname, "node2", 5) == 0)
{
......
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