/* * te_defs.h * * Created on: Nov 4, 2014 * Author: Alan Aguilar Sologuren */ #ifndef UTILS_TE_STRUCTS_H_ #define UTILS_TE_STRUCTS_H_ #include /*mascaras disponibles para GPS 15xL*/ #define GPNON 0x0000 /**< Unknown packet type. */ #define GPGGA 0x0001 /**< GGA - Essential fix data which provide 3D location and accuracy data. */ #define GPGSA 0x0002 /**< GSA - GPS receiver operating mode, SVs used for navigation, and DOP values. */ #define GPGSV 0x0004 /**< GSV - Number of SVs in view, PRN numbers, elevation, azimuth & SNR values. */ #define GPRMC 0x0008 /**< RMC - Recommended Minimum Specific GPS/TRANSIT Data. */ #define GPVTG 0x0010 /**< VTG - Actual track made good and speed over ground. */ #define GPALM 0x0020 #define GPGLL 0x0040 #define PGRMI 0x0080 #define PGRMC 0x0100 #define PGRMC1 0x0200 #define PGRMO 0x0400 /////////////////////////////////////////////////////////////////////////////// // ESTRUCTURAS PARA MODULO DE CONTROL DE RECEPTOR GNSS (GPS-15xL) /////////////////////////////////////////////////////////////////////////////// /*! * */ typedef struct gnss_config_struct_{ uint8_t baudrate; /*!< baudrate of uart port of gnss receptor */ uint16_t nmea_mask; /*!< mask to indicate witch nmea frame will be actived */ gnss_config_struct_(): baudrate(9600), nmea_mask(GPNON){} }gnss_config_struct; /*! * \struct gnss_precise_time * \brief Estructura de tiempo de GNSS para almacenar tiempo preciso. * Almacena tiempo con resolucion de microsegundos. */ typedef struct gnss_precise_time_{ int year; /*!< year of gnss data */ int doy; /*!< day of year of gnss data */ int hour; /*!< hour of gnss data */ int minu; /*!< minute of gnss data */ int sec; /*!< seconds of gnss data */ int usec; /*!< microseconds of gnss data */ gnss_precise_time_(): year(0), doy(0), hour(0), minu(0), sec(0), usec(0){} }gnss_precise_time; /////////////////////////////////////////////////////////////////////////////// // ESTRUCTURAS PARA EL MODULO DE CONTROL DEL GENERADOR DE CLOCK /////////////////////////////////////////////////////////////////////////////// /*! * */ typedef struct clock_config_struct_{ }clock_config_struct; /*! * */ typedef struct clock_state_struct_{ }clock_state_struct; /////////////////////////////////////////////////////////////////////////////// // ESTRUCTURAS PARA MODULO DE CONTROL DE RTC /////////////////////////////////////////////////////////////////////////////// /*! * \struct ds1308_ctl_byte * \brief Estructura para almacenar informacion de configuracion para * el registro con direccion DS1308_CTL_ADD (0x07) del DS1308. */ typedef struct ds1308_ctl_byte_ { uint8_t rs0:1; uint8_t rs1:1; uint8_t bbclk:1; uint8_t los:1; uint8_t sqwe:1; uint8_t osf:1; uint8_t eclk:1; uint8_t out:1; ds1308_ctl_byte_(): rs0(0), rs1(0), bbclk(0), los(0), sqwe(0), osf(0), eclk(1), out(0){} }ds1308_ctl_byte; /*! * \struct ds1308_clock_halt * \brief Estructura para configurar el arranque o parada de funciones * timekeeping del DS1308 */ typedef struct ds1308_clock_halt_ { uint8_t dummy_dont_use:7; uint8_t ch:1; ds1308_clock_halt_(): dummy_dont_use(0), ch(0){} }ds1308_clock_halt; /*! * \struct rtc_config_struct * \brief Almacena toda la informmacion necesaria para configurar el IC * DS1308. */ typedef struct rtc_config_struct_{ ds1308_clock_halt clk_halt; ds1308_ctl_byte ctl_byte; }rtc_config_struct; /////////////////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////////////// /*! * */ typedef struct te_status_struct_{ }te_status_struct; /*! * */ typedef struct te_time_pkg_{ gnss_precise_time time; /*!< Tiempo de adquisicion de un PPS de GNSS especifico */ uint16_t pps_serial; /*!< Numero serial de un PPS desde que la linea de enganche GNSS (LOCK) fue activada (max 1800) */ bool is_gnss_time; /*!< true si el tiempo dado proviene del un receptor GNSS */ gnss_precise_time * pnext; /*!< Apunta al siguiente paquete de tiempo */ gnss_precise_time * previous; /*!< Apunta al paquete de tempo anterior. */ te_time_pkg_(): pps_serial(0), is_gnss_time(false), pnext(0), previous(0){} }te_time_pkg; /*! * */ typedef struct te_command_struct_{ }te_command_struct; #endif /* UTILS_TE_STRUCTS_H_ */