Files
gps/soc/software/gps_system/header/linked_list.h
T
2026-07-12 11:01:51 +03:00

48 lines
1.7 KiB
C

#ifndef LINKED_LIST_H_INCLUDED
#define LINKED_LIST_H_INCLUDED
#include "gps_ip_defines.h"
typedef enum {
GPS_TOW_SOURCE_HOW = 0,
GPS_TOW_SOURCE_NAV_SOLVE
} gps_tow_source_t;
typedef struct gps_ephem_ll {
volatile gps_ephemeris_t* data_p;
unsigned char tracking_ip_no;
struct gps_ephem_ll* next;
volatile unsigned int gps_subframe_mask;
volatile gps_tow_source_t gps_tow_source;
volatile uint32_t gps_nav_solve_sequence;
volatile uint32_t gps_nav_solve_consumed_sequence;
volatile uint32_t gps_last_nav_solve_abs_sample;
volatile double gps_last_nav_solve_corrected_abs_sample;
volatile uint64_t gps_last_nav_solve_pps_counter;
volatile uint32_t gps_last_pps_capture_sequence;
volatile uint64_t gps_last_measurement_tick;
volatile bool gps_measurement_valid;
} gps_ephem_ll_t;
typedef struct gps_acq_ll {
unsigned int prn_no;
struct gps_acq_ll* next;
} gps_acq_ll_t;
extern volatile gps_ephem_ll_t* tracking_node;
extern volatile gps_acq_ll_t* acquisition_node;
bool insert_element(volatile gps_ephem_ll_t** node,
volatile gps_ephemeris_t* data_p,
unsigned char trck_ip_no);
bool delete_by_ip_number(volatile gps_ephem_ll_t** node, unsigned char trck_ip_no);
bool trck_ip_exists(volatile gps_ephem_ll_t** node, unsigned char trck_ip_no);
volatile gps_ephem_ll_t* get_element_by_ip_number(volatile gps_ephem_ll_t** node,
unsigned char trck_ip_no);
bool insert_acq_element(volatile gps_acq_ll_t** node, unsigned int prn_no);
bool delete_acq_element_by_prn_number(volatile gps_acq_ll_t** node, unsigned int prn_no);
bool acq_prn_exists(volatile gps_acq_ll_t** node, unsigned int prn_no);
#endif