Commit c7d61621 authored by yoogx's avatar yoogx
Browse files

* deployment.h must be included _before_ to ensure the file is correctly compiled

parent 1d732ef0
......@@ -8,14 +8,12 @@
* Copyright (C) 2010-2018 ESA & ISAE.
*/
#ifdef __PO_HI_NEED_DRIVER_SPACEWIRE_RASTA
#include <string.h> // for memcpy
#include <deployment.h>
/* Generated code header */
#ifdef __PO_HI_NEED_DRIVER_SPACEWIRE_RASTA
#include <string.h> // for memcpy
#include <activity.h>
#include <marshallers.h>
#include <deployment.h>
......@@ -52,9 +50,9 @@
#endif
#if defined GRLEON3 && defined RTEMS412
#include <rtems.h>
#include <rtems.h>
#include <bsp/grspw.h>
#endif
#endif
/* Rasta includes from GAISLER drivers */
......@@ -158,9 +156,9 @@ void __po_hi_c_driver_spacewire_rasta_init (__po_hi_device_id id)
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd, SPACEWIRE_IOCTRL_SET_PROMISCUOUS, 1); // Receive from any source
*/
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_STOP,NULL);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_STOP,NULL);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_SET_DISCONNECT,43);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_SET_COREFREQ,30000);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_SET_COREFREQ,30000);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_SET_RXBLOCK,1);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_SET_TXBLOCK,1);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_SET_NODEADDR, node_addr);
......@@ -169,7 +167,7 @@ void __po_hi_c_driver_spacewire_rasta_init (__po_hi_device_id id)
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_SET_TXBLOCK_ON_FULL,1);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_SET_RM_PROT_ID,0);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(po_hi_c_driver_rasta_spacewire_fd[id],SPACEWIRE_IOCTRL_START,2000);
#ifdef RTEMS412
spw_config *cnf = (spw_config *)malloc(sizeof(spw_config));
......@@ -261,7 +259,7 @@ int __po_hi_c_driver_spacewire_rasta_sender (const __po_hi_task_id task_id, cons
len = write (po_hi_c_driver_rasta_spacewire_fd[dev_id], __po_hi_c_driver_spacewire_rasta_sender_msg.content, __PO_HI_MESSAGES_MAX_SIZE);
}
fsync(po_hi_c_driver_rasta_spacewire_fd[dev_id]);
fsync(po_hi_c_driver_rasta_spacewire_fd[dev_id]);
if (len < 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