fsw_spacewire.h
58 lines
| 2.6 KiB
| text/x-c
|
CLexer
/ header / fsw_spacewire.h
paul
|
r35 | #ifndef FSW_SPACEWIRE_H_INCLUDED | ||
#define FSW_SPACEWIRE_H_INCLUDED | ||||
paul
|
r45 | #include <rtems.h> | ||
#include <grspw.h> | ||||
#include <fcntl.h> // for O_RDWR | ||||
#include <unistd.h> // for the read call | ||||
#include <sys/ioctl.h> // for the ioctl call | ||||
#include <errno.h> | ||||
#include "fsw_params.h" | ||||
#include "tc_handler.h" | ||||
paul
|
r197 | #include "fsw_init.h" | ||
paul
|
r35 | |||
paul
|
r263 | extern spw_stats grspw_stats; | ||
paul
|
r248 | extern rtems_name timecode_timer_name; | ||
extern rtems_id timecode_timer_id; | ||||
paul
|
r271 | extern unsigned char oneTcLfrUpdateTimeReceived; | ||
paul
|
r35 | |||
// RTEMS TASK | ||||
paul
|
r45 | rtems_task spiq_task( rtems_task_argument argument ); | ||
rtems_task recv_task( rtems_task_argument unused ); | ||||
rtems_task send_task( rtems_task_argument argument ); | ||||
paul
|
r254 | rtems_task link_task( rtems_task_argument argument ); | ||
paul
|
r35 | |||
paul
|
r46 | int spacewire_open_link( void ); | ||
int spacewire_start_link( int fd ); | ||||
paul
|
r127 | int spacewire_stop_and_start_link( int fd ); | ||
paul
|
r46 | int spacewire_configure_link(int fd ); | ||
paul
|
r253 | int spacewire_several_connect_attemps( void ); | ||
paul
|
r45 | void spacewire_set_NP( unsigned char val, unsigned int regAddr ); // No Port force | ||
void spacewire_set_RE( unsigned char val, unsigned int regAddr ); // RMAP Enable | ||||
paul
|
r264 | void spacewire_read_statistics( void ); | ||
paul
|
r269 | void spacewire_get_last_error( void ); | ||
paul
|
r263 | void update_hk_lfr_last_er_fields(unsigned int rid, unsigned char code); | ||
paul
|
r264 | void update_hk_with_grspw_stats(void ); | ||
paul
|
r249 | void increase_unsigned_char_counter( unsigned char *counter ); | ||
paul
|
r35 | |||
paul
|
r172 | void init_header_cwf( Header_TM_LFR_SCIENCE_CWF_t *header ); | ||
void init_header_swf( Header_TM_LFR_SCIENCE_SWF_t *header ); | ||||
void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header ); | ||||
int spw_send_waveform_CWF( ring_node *ring_node_to_send, Header_TM_LFR_SCIENCE_CWF_t *header ); | ||||
int spw_send_waveform_SWF( ring_node *ring_node_to_send, Header_TM_LFR_SCIENCE_SWF_t *header ); | ||||
int spw_send_waveform_CWF3_light( ring_node *ring_node_to_send, Header_TM_LFR_SCIENCE_CWF_t *header ); | ||||
paul
|
r196 | void spw_send_asm_f0( ring_node *ring_node_to_send, Header_TM_LFR_SCIENCE_ASM_t *header ); | ||
void spw_send_asm_f1( ring_node *ring_node_to_send, Header_TM_LFR_SCIENCE_ASM_t *header ); | ||||
void spw_send_asm_f2( ring_node *ring_node_to_send, Header_TM_LFR_SCIENCE_ASM_t *header ); | ||||
paul
|
r194 | void spw_send_k_dump( ring_node *ring_node_to_send ); | ||
paul
|
r172 | |||
paul
|
r248 | unsigned int check_timecode_and_previous_timecode_coherency(unsigned char currentTimecodeCtr); | ||
unsigned int check_timecode_and_internal_time_coherency(unsigned char timecode, unsigned char internalTime); | ||||
paul
|
r45 | void timecode_irq_handler( void *pDev, void *regs, int minor, unsigned int tc ); | ||
paul
|
r271 | rtems_timer_service_routine timecode_timer_routine( rtems_id timer_id, void *user_data ); | ||
paul
|
r35 | |||
paul
|
r45 | void (*grspw_timecode_callback) ( void *pDev, void *regs, int minor, unsigned int tc ); | ||
paul
|
r35 | |||
#endif // FSW_SPACEWIRE_H_INCLUDED | ||||