LCOV - code coverage report
Current view: top level - header - fsw_misc.h (source / functions) Hit Total Coverage
Test: trace.info Lines: 2 2 100.0 %
Date: 2023-02-20 11:47:15 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef FSW_MISC_H_INCLUDED
       2             : #define FSW_MISC_H_INCLUDED
       3             : 
       4             : #include <rtems.h>
       5             : 
       6             : //#include <grspw.h>
       7             : 
       8             : #include <stdio.h>
       9             : 
      10             : 
      11             : #include "lfr_common_headers/fsw_params.h"
      12             : #include "fsw_globals.h"
      13             : 
      14             : #define WATCHDOG_LOOP_PRINTF 10
      15             : #define WATCHDOG_LOOP_DEBUG  3
      16             : 
      17             : #define LFR_NO_RETURN __attribute__((noreturn))
      18             : 
      19             : #define NB_RTEMS_EVENTS 32
      20             : #define EVENT_12        12
      21             : #define EVENT_13        13
      22             : #define EVENT_14        14
      23             : #define DUMB_MESSAGE_1  "in DUMB *** timecode_irq_handler"
      24             : #define DUMB_MESSAGE_12 "WATCHDOG timer"
      25             : #define DUMB_MESSAGE_13 "TIMECODE timer"
      26             : 
      27             : #ifdef PRINT_MESSAGES_ON_CONSOLE
      28             :     #define DUMB_TASK_ENABLED
      29             : #endif
      30             : 
      31             : #define MAX_OF(type)                                                                               \
      32             :     (((type)(~0LLU) > (type)((1LLU << ((sizeof(type) << 3) - 1)) - 1LLU))                          \
      33             :             ? (long long unsigned int)(type)(~0LLU)                                                \
      34             :             : (long long unsigned int)(type)((1LLU << ((sizeof(type) << 3) - 1)) - 1LLU))
      35             : 
      36             : 
      37             : extern void ASR16_get_FPRF_IURF_ErrorCounters(unsigned int*, unsigned int*);
      38             : extern void CCR_getInstructionAndDataErrorCounters(unsigned int*, unsigned int*);
      39             : 
      40             : extern rtems_name name_hk_rate_monotonic; // name of the HK rate monotonic
      41             : extern rtems_id HK_id; // id of the HK rate monotonic period
      42             : extern rtems_name name_avgv_rate_monotonic; // name of the AVGV rate monotonic
      43             : extern rtems_id AVGV_id; // id of the AVGV rate monotonic period
      44             : 
      45             : 
      46             : // RTEMS TASKS
      47             : rtems_task load_task(rtems_task_argument argument);
      48             : rtems_task hous_task(rtems_task_argument argument);
      49             : rtems_task avgv_task(rtems_task_argument argument);
      50             : rtems_task dumb_task(rtems_task_argument unused);
      51             : rtems_task scrubbing_task(rtems_task_argument unused);
      52             : rtems_task calibration_sweep_task(rtems_task_argument unused);
      53             : 
      54             : static inline rtems_status_code send_event_dumb_task(rtems_event_set event)
      55             : {
      56             : #ifdef DUMB_TASK_ENABLED
      57           1 :     return rtems_event_send(Task_id[TASKID_DUMB], event);
      58             : #else
      59             :     (void)event;
      60             :     return RTEMS_SUCCESSFUL;
      61             : #endif
      62             : }
      63             : 
      64             : extern int sched_yield(void);
      65             : extern void rtems_cpu_usage_reset();
      66             : extern ring_node* current_ring_node_f3;
      67             : extern ring_node* ring_node_to_send_cwf_f3;
      68             : extern ring_node waveform_ring_f3[];
      69             : extern unsigned short sequenceCounterHK;
      70             : 
      71             : extern unsigned char hk_lfr_q_sd_fifo_size_max;
      72             : extern unsigned char hk_lfr_q_rv_fifo_size_max;
      73             : extern unsigned char hk_lfr_q_p0_fifo_size_max;
      74             : extern unsigned char hk_lfr_q_p1_fifo_size_max;
      75             : extern unsigned char hk_lfr_q_p2_fifo_size_max;
      76             : 
      77             : static inline unsigned char increase_unsigned_char_counter(unsigned char counter)
      78             : {
      79           1 :     return (counter + 1) & 0xFF;
      80             : }
      81             : 
      82             : #endif // FSW_MISC_H_INCLUDED
      83             : 

Generated by: LCOV version 1.14