wf_handler.h
80 lines
| 2.7 KiB
| text/x-c
|
CLexer
/ header / wf_handler.h
paul@pc-solar1.lab-lpp.local
|
r5 | #ifndef WF_HANDLER_H_INCLUDED | ||
#define WF_HANDLER_H_INCLUDED | ||||
paul
|
r45 | #include <rtems.h> | ||
#include <grspw.h> | ||||
#include <stdio.h> | ||||
#include <math.h> | ||||
paul
|
r33 | |||
paul
|
r45 | #include "fsw_params.h" | ||
paul@pc-solar1.lab-lpp.local
|
r18 | |||
#define pi 3.1415 | ||||
paul@pc-solar1.lab-lpp.local
|
r5 | |||
extern int fdSPW; | ||||
paul@pc-solar1.lab-lpp.local
|
r18 | extern volatile int wf_snap_f0[ ]; | ||
paul
|
r33 | // | ||
paul@pc-solar1.lab-lpp.local
|
r18 | extern volatile int wf_snap_f1[ ]; | ||
paul@pc-solar1.lab-lpp.local
|
r19 | extern volatile int wf_snap_f1_bis[ ]; | ||
paul
|
r33 | extern volatile int wf_snap_f1_norm[ ]; | ||
// | ||||
paul@pc-solar1.lab-lpp.local
|
r18 | extern volatile int wf_snap_f2[ ]; | ||
paul@pc-solar1.lab-lpp.local
|
r22 | extern volatile int wf_snap_f2_bis[ ]; | ||
paul
|
r33 | extern volatile int wf_snap_f2_norm[ ]; | ||
// | ||||
paul@pc-solar1.lab-lpp.local
|
r18 | extern volatile int wf_cont_f3[ ]; | ||
paul
|
r32 | extern volatile int wf_cont_f3_bis[ ]; | ||
paul
|
r38 | extern char wf_cont_f3_light[ ]; | ||
paul@pc-solar1.lab-lpp.local
|
r18 | extern waveform_picker_regs_t *waveform_picker_regs; | ||
paul
|
r45 | extern time_management_regs_t *time_management_regs; | ||
extern Packet_TM_LFR_HK_t housekeeping_packet; | ||||
extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | ||||
extern struct param_local_str param_local; | ||||
extern rtems_name misc_name[5]; | ||||
paul
|
r46 | extern rtems_name Task_name[20]; /* array of task ids */ | ||
paul
|
r45 | extern rtems_id Task_id[20]; /* array of task ids */ | ||
paul
|
r46 | |||
paul
|
r45 | extern unsigned char lfrCurrentMode; | ||
paul@pc-solar1.lab-lpp.local
|
r5 | |||
rtems_isr waveforms_isr( rtems_vector_number vector ); | ||||
paul@pc-solar1.lab-lpp.local
|
r18 | rtems_isr waveforms_simulator_isr( rtems_vector_number vector ); | ||
paul
|
r38 | rtems_task wfrm_task( rtems_task_argument argument ); | ||
rtems_task cwf3_task( rtems_task_argument argument ); | ||||
rtems_task cwf2_task( rtems_task_argument argument ); | ||||
rtems_task cwf1_task( rtems_task_argument argument ); | ||||
paul@pc-solar1.lab-lpp.local
|
r5 | |||
paul@pc-solar1.lab-lpp.local
|
r17 | //****************** | ||
// general functions | ||||
paul@pc-solar1.lab-lpp.local
|
r18 | void init_waveforms( void ); | ||
paul
|
r33 | // | ||
paul
|
r38 | int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF ); | ||
int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); | ||||
int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); | ||||
paul
|
r33 | // | ||
paul@pc-solar1.lab-lpp.local
|
r18 | void reset_waveforms( void ); | ||
paul
|
r45 | // | ||
paul
|
r38 | int send_waveform_SWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id ); | ||
int send_waveform_CWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); | ||||
int send_waveform_CWF3( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); | ||||
int send_waveform_CWF3_light( volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); | ||||
paul
|
r45 | // | ||
rtems_id get_pkts_queue_id( void ); | ||||
paul@pc-solar1.lab-lpp.local
|
r23 | |||
//************** | ||||
// wfp registers | ||||
paul
|
r32 | void set_wfp_data_shaping(); | ||
char set_wfp_delta_snapshot(); | ||||
void set_wfp_burst_enable_register( unsigned char mode); | ||||
paul@pc-solar1.lab-lpp.local
|
r23 | void reset_wfp_burst_enable(); | ||
paul
|
r33 | void reset_wfp_status(); | ||
paul
|
r31 | void reset_waveform_picker_regs(); | ||
paul
|
r32 | |||
//***************** | ||||
// local parameters | ||||
void set_local_sbm1_nb_cwf_max(); | ||||
void set_local_sbm2_nb_cwf_max(); | ||||
void set_local_nb_interrupt_f0_MAX(); | ||||
void reset_local_sbm1_nb_cwf_sent(); | ||||
void reset_local_sbm2_nb_cwf_sent(); | ||||
paul@pc-solar1.lab-lpp.local
|
r17 | |||
paul@pc-solar1.lab-lpp.local
|
r5 | #endif // WF_HANDLER_H_INCLUDED | ||