fsw_misc.h
87 lines
| 3.0 KiB
| text/x-c
|
CLexer
/ header / fsw_misc.h
paul@pc-solar1.lab-lpp.local
|
r5 | #ifndef FSW_MISC_H_INCLUDED | ||
#define FSW_MISC_H_INCLUDED | ||||
paul
|
r45 | #include <rtems.h> | ||
#include <stdio.h> | ||||
#include <grspw.h> | ||||
paul
|
r175 | #include <grlib_regs.h> | ||
paul
|
r45 | |||
#include "fsw_params.h" | ||||
#include "fsw_spacewire.h" | ||||
paul
|
r134 | #include "lfr_cpu_usage_report.h" | ||
paul@pc-solar1.lab-lpp.local
|
r5 | |||
paul
|
r259 | |||
paul
|
r226 | enum lfr_reset_cause_t{ | ||
UNKNOWN_CAUSE, | ||||
POWER_ON, | ||||
TC_RESET, | ||||
WATCHDOG, | ||||
ERROR_RESET, | ||||
UNEXP_RESET | ||||
}; | ||||
paul
|
r239 | extern gptimer_regs_t *gptimer_regs; | ||
paul
|
r259 | extern void ASR16_get_FPRF_IURF_ErrorCounters( unsigned int*, unsigned int* ); | ||
extern void CCR_getInstructionAndDataErrorCounters( unsigned int*, unsigned int* ); | ||||
paul
|
r239 | |||
paul
|
r226 | #define LFR_RESET_CAUSE_UNKNOWN_CAUSE 0 | ||
paul
|
r239 | rtems_name name_hk_rate_monotonic; // name of the HK rate monotonic | ||
rtems_id HK_id; // id of the HK rate monotonic period | ||||
paul
|
r298 | rtems_name name_avgv_rate_monotonic; // name of the AVGV rate monotonic | ||
rtems_id AVGV_id; // id of the AVGV rate monotonic period | ||||
paul
|
r45 | |||
paul
|
r239 | void timer_configure( unsigned char timer, unsigned int clock_divider, | ||
paul@pc-solar1.lab-lpp.local
|
r5 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ); | ||
paul
|
r239 | void timer_start( unsigned char timer ); | ||
void timer_stop( unsigned char timer ); | ||||
void timer_set_clock_divider(unsigned char timer, unsigned int clock_divider); | ||||
// WATCHDOG | ||||
rtems_isr watchdog_isr( rtems_vector_number vector ); | ||||
void watchdog_configure(void); | ||||
void watchdog_stop(void); | ||||
paul
|
r262 | void watchdog_reload(void); | ||
paul
|
r239 | void watchdog_start(void); | ||
paul@pc-solar1.lab-lpp.local
|
r17 | |||
// SERIAL LINK | ||||
paul@pc-solar1.lab-lpp.local
|
r25 | int send_console_outputs_on_apbuart_port( void ); | ||
paul
|
r94 | int enable_apbuart_transmitter( void ); | ||
paul
|
r40 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value); | ||
paul@pc-solar1.lab-lpp.local
|
r17 | |||
// RTEMS TASKS | ||||
paul
|
r239 | rtems_task load_task( rtems_task_argument argument ); | ||
paul
|
r45 | rtems_task hous_task( rtems_task_argument argument ); | ||
paul
|
r298 | rtems_task avgv_task( rtems_task_argument argument ); | ||
paul
|
r45 | rtems_task dumb_task( rtems_task_argument unused ); | ||
paul
|
r35 | |||
paul
|
r46 | void init_housekeeping_parameters( void ); | ||
paul
|
r149 | void increment_seq_counter(unsigned short *packetSequenceControl); | ||
paul
|
r75 | void getTime( unsigned char *time); | ||
paul
|
r117 | unsigned long long int getTimeAsUnsignedLongLongInt( ); | ||
paul
|
r110 | void send_dumb_hk( void ); | ||
paul
|
r185 | void get_temperatures( unsigned char *temperatures ); | ||
paul
|
r182 | void get_v_e1_e2_f3( unsigned char *spacecraft_potential ); | ||
paul
|
r134 | void get_cpu_load( unsigned char *resource_statistics ); | ||
paul
|
r212 | void set_hk_lfr_sc_potential_flag( bool state ); | ||
paul
|
r295 | void set_sy_lfr_pas_filter_enabled( bool state ); | ||
paul
|
r262 | void set_sy_lfr_watchdog_enabled( bool state ); | ||
paul
|
r212 | void set_hk_lfr_calib_enable( bool state ); | ||
paul
|
r226 | void set_hk_lfr_reset_cause( enum lfr_reset_cause_t lfr_reset_cause ); | ||
paul
|
r240 | void hk_lfr_le_me_he_update(); | ||
paul
|
r249 | void set_hk_lfr_time_not_synchro(); | ||
paul
|
r75 | |||
paul
|
r118 | extern int sched_yield( void ); | ||
paul
|
r166 | extern void rtems_cpu_usage_reset(); | ||
paul
|
r132 | extern ring_node *current_ring_node_f3; | ||
extern ring_node *ring_node_to_send_cwf_f3; | ||||
paul
|
r171 | extern ring_node waveform_ring_f3[]; | ||
paul
|
r149 | extern unsigned short sequenceCounterHK; | ||
paul
|
r118 | |||
paul
|
r197 | extern unsigned char hk_lfr_q_sd_fifo_size_max; | ||
extern unsigned char hk_lfr_q_rv_fifo_size_max; | ||||
extern unsigned char hk_lfr_q_p0_fifo_size_max; | ||||
extern unsigned char hk_lfr_q_p1_fifo_size_max; | ||||
extern unsigned char hk_lfr_q_p2_fifo_size_max; | ||||
paul@pc-solar1.lab-lpp.local
|
r5 | #endif // FSW_MISC_H_INCLUDED | ||