Subversion Repositories NaviCtrl

Rev

Rev 245 | Rev 263 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 245 Rev 247
Line 17... Line 17...
17
 
17
 
18
#define INVALID         0x00
18
#define INVALID         0x00
19
#define NEWDATA         0x01
19
#define NEWDATA         0x01
Line 20... Line -...
20
#define PROCESSED       0x02
-
 
21
 
-
 
22
#define UBX_CLASS_CFG   0x06
20
#define PROCESSED       0x02
23
 
21
 
24
typedef struct
22
typedef struct
25
{
23
{
26
        s32 Longitude;  // in 1E-7 deg
24
        s32 Longitude;  // in 1E-7 deg
Line 49... Line 47...
49
 
47
 
50
// The data are valid if the GPSData.Status is NEWDATA or PROCESSED.
48
// The data are valid if the GPSData.Status is NEWDATA or PROCESSED.
51
// To achieve new data after reading the GPSData.Status should be set to PROCESSED.
49
// To achieve new data after reading the GPSData.Status should be set to PROCESSED.
Line -... Line 50...
-
 
50
extern gps_data_t  GPSData;
-
 
51
 
-
 
52
 
-
 
53
#define UBX_CLASS_CFG   0x06
52
extern gps_data_t  GPSData;
54
#define UBX_CLASS_ACK   0x05
53
 
55
 
-
 
56
typedef struct
-
 
57
{
-
 
58
        u8 Class;
54
typedef struct
59
        u8 Id;
-
 
60
        u16 Length;
-
 
61
}  __attribute__((packed)) ubxmsghdr_t;
-
 
62
 
55
{
63
typedef struct
-
 
64
{
56
        u8 Ack;                                 // 1: msg acknowledged, 0: not acknowledged
65
        u8 ClassMask;
-
 
66
        u8 IdMask;
57
        u8 clsID;                               // the msg class
67
        ubxmsghdr_t Hdr;
58
        u8 msgID;                           // the msg id
68
        u8 Data[100];
-
 
69
        u8 Status;
-
 
70
} __attribute__((packed)) ubxmsg_t;
59
        u8 Status;                              // invalid/newdata/processed    
71
// msg obj to reveive
-
 
72
// set Class and Id and correspoinding masks of a message that should be received
Line 60... Line 73...
60
} __attribute__((packed)) ubx_ack_t;
73
extern volatile ubxmsg_t UbxMsg;
Line 61... Line 74...
61
extern volatile ubx_ack_t UbxAck;
74
 
62
 
75
 
63
extern u32 UBX_Timeout;
76
extern u32 UBX_Timeout;
Line 64... Line 77...
64
 
77