Commit 9de4d672 authored by julien.delange's avatar julien.delange

* add skels for spacewire driver, example compiles fine,

   must populate the code



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@581 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent e75dc5e9
AUTOMAKE_OPTIONS = no-dependencies
EXTRA_DIST = $(srcdir)/po_hi_driver_linux_serial.h \
$(srcdir)/po_hi_driver_rasta_spacewire.h \
$(srcdir)/po_hi_driver_sockets.h \
$(srcdir)/rtems_utils.h \
$(srcdir)/po_hi_driver_rasta_serial.h
......
/*
* This is a part of PolyORB-HI-C distribution, a minimal
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* Copyright (C) 2010, European Space Agency
*/
#include <deployment.h>
#ifndef __PO_HI_DRIVER_RASTA_SPACEWIRE_H__
#define __PO_HI_DRIVER_RASTA_SPACEWIRE_H__
#ifdef __PO_HI_NEED_DRIVER_SPACEWIRE_RASTA
void __po_hi_c_driver_spacewire_rasta_poller (void);
void __po_hi_c_driver_spacewire_rasta_init (void);
int __po_hi_c_driver_spacewire_rasta_sender (const __po_hi_task_id task_id, const __po_hi_port_t port);
#endif
#endif
......@@ -80,6 +80,7 @@ ifeq ($(NEED_TRANSPORT), yes)
drivers/po_hi_driver_linux_serial.o \
drivers/po_hi_driver_sockets.o \
drivers/po_hi_driver_rasta_serial.o \
drivers/po_hi_driver_rasta_spacewire.o \
$(ACTUAL_TRANSPORT) \
po_hi_transport.o $(TARGET_TRANSPORT_SOURCES)
......
......@@ -2,6 +2,7 @@ AUTOMAKE_OPTIONS = no-dependencies
C_FILES = $(srcdir)/po_hi_driver_linux_serial.c \
$(srcdir)/po_hi_driver_sockets.c \
$(srcdir)/po_hi_driver_rasta_spacewire.c \
$(srcdir)/po_hi_driver_rasta_serial.c
csrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/src/drivers'}
......
......@@ -118,7 +118,7 @@ void __po_hi_c_driver_serial_linux_init (void)
/*
* Raw output.
*/
newtio.c_oflag = 0;
newtio.c_oflag = 1;
/*
* ICANON : enable canonical input
......
......@@ -40,7 +40,7 @@ void __po_hi_c_driver_serial_rasta_poller (void)
{
char buf[1024];
int n;
__DEBUGMSG ("Hello, i'm the serial RASTA poller !\n");
__DEBUGMSG ("[RASTA SERIAL] Hello, i'm the poller !\n");
n = read (po_hi_c_driver_rasta_serial_fd, &buf, 6);
__DEBUGMSG ("[RASTA SERIAL] read() returns %d\n", n);
if (n > 0)
......
/*
* This is a part of PolyORB-HI-C distribution, a minimal
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* Copyright (C) 2010, European Space Agency
*/
#include <deployment.h>
/* Generated code header */
#ifdef __PO_HI_NEED_DRIVER_SPACEWIRE_RASTA
#include <marshallers.h>
#include <po_hi_debug.h>
#include <po_hi_transport.h>
#include <po_hi_gqueue.h>
#include <po_hi_messages.h>
#include <drivers/rtems_utils.h>
#include <drivers/po_hi_driver_rasta_spacewire.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
/* POSIX-style files */
#include <pci.h>
#include <rasta.h>
#include <grspw_rasta.h>
#include <apbuart_rasta.h>
/* Rasta includes from GAISLER drivers */
#define __PO_HI_DRIVER_SPACEWIRE_RASTA_DEVICE "/dev/grspwrasta0"
int po_hi_c_driver_rasta_spacewire_fd;
void __po_hi_c_driver_spacewire_rasta_poller (void)
{
__DEBUGMSG ("[RASTA SPACEWIRE] Hello, i'm the poller !\n");
}
void __po_hi_c_driver_spacewire_rasta_init (void)
{
__DEBUGMSG ("[RASTA SPACEWIRE] Init\n");
init_pci();
__DEBUGMSG ("[RASTA SPACEWIRE] Initializing RASTA ...\n");
if ( rasta_register() ){
__DEBUGMSG(" ERROR !\n");
return;
}
__DEBUGMSG(" OK !\n");
}
int __po_hi_c_driver_spacewire_rasta_sender (const __po_hi_task_id task_id, const __po_hi_port_t port)
{
(void) task_id;
(void) port;
return 1;
}
#endif /* __PO_HI_NEED_DRIVER_SPACEWIRE_RASTA */
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