fsw_globals.c
61 lines
| 2.4 KiB
| text/x-c
|
CLexer
/ src / fsw_globals.c
|
r31 | //#include <fsw_processing.h> | ||
|
r8 | #include <rtems.h> | ||
|
r23 | #include <grspw.h> | ||
|
r16 | #include <ccsds_types.h> | ||
|
r31 | #include <grlib_regs.h> | ||
#include <fsw_params.h> | ||||
|
r8 | |||
// RTEMS GLOBAL VARIABLES | ||||
|
r9 | rtems_name misc_name[5]; | ||
rtems_name misc_id[5]; | ||||
|
r18 | rtems_id Task_id[15]; /* array of task ids */ | ||
|
r16 | rtems_name Task_name[15]; /* array of task names */ | ||
|
r18 | int fdSPW = 0; | ||
int fdUART = 0; | ||||
|
r11 | // APB CONFIGURATION REGISTERS | ||
time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT; | ||||
|
r18 | gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER; | ||
|
r31 | #ifdef GSA | ||
#else | ||||
waveform_picker_regs_t *waveform_picker_regs = (waveform_picker_regs_t*) REGS_ADDR_WAVEFORM_PICKER; | ||||
#endif | ||||
spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX; | ||||
|
r11 | |||
|
r19 | // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes | ||
volatile int wf_snap_f0[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET]; | ||||
volatile int wf_snap_f1[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET]; | ||||
volatile int wf_snap_f1_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET]; | ||||
volatile int wf_snap_f2[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET]; | ||||
|
r22 | volatile int wf_snap_f2_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET]; | ||
|
r19 | volatile int wf_cont_f3[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET]; | ||
|
r5 | |||
// SPECTRAL MATRICES GLOBAL VARIABLES | ||||
|
r31 | volatile int spec_mat_f0_a[ TOTAL_SIZE_SM ]; | ||
volatile int spec_mat_f0_b[ TOTAL_SIZE_SM ]; | ||||
volatile int spec_mat_f0_c[ TOTAL_SIZE_SM ]; | ||||
volatile int spec_mat_f0_d[ TOTAL_SIZE_SM ]; | ||||
volatile int spec_mat_f0_e[ TOTAL_SIZE_SM ]; | ||||
volatile int spec_mat_f0_f[ TOTAL_SIZE_SM ]; | ||||
volatile int spec_mat_f0_g[ TOTAL_SIZE_SM ]; | ||||
volatile int spec_mat_f0_h[ TOTAL_SIZE_SM ]; | ||||
|
r18 | // | ||
|
r31 | volatile int spec_mat_f1_a[ TOTAL_SIZE_SM ]; | ||
volatile int spec_mat_f2_a[ TOTAL_SIZE_SM ]; | ||||
// | ||||
volatile int spec_mat_f0_a_bis[ TOTAL_SIZE_SM ]; | ||||
volatile int spec_mat_f1_a_bis[ TOTAL_SIZE_SM ]; | ||||
volatile int spec_mat_f2_a_bis[ TOTAL_SIZE_SM ]; | ||||
|
r5 | |||
|
r11 | // MODE PARAMETERS | ||
|
r28 | Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | ||
|
r23 | struct param_local_str param_local; | ||
|
r10 | |||
|
r16 | // HK PACKETS | ||
|
r17 | Packet_TM_LFR_HK_t housekeeping_packet; | ||
|
r23 | // sequence counters are incremented by APID (PID + CAT) and destination ID | ||
|
r21 | unsigned short sequenceCounters[SEQ_CNT_NB_PID][SEQ_CNT_NB_CAT][SEQ_CNT_NB_DEST_ID]; | ||
|
r23 | spw_stats spacewire_stats; | ||
spw_stats spacewire_stats_backup; | ||||
|
r16 | |||
|
r15 | |||