@@ -42,9 +42,39 @@ class SparkFunAppleAccessoryDriver
42
42
*
43
43
* @param latestGPGST Pointer to the latest GNSS NMEA GPGST message (optional)
44
44
*
45
- * @note The pointers will be set the nullptr once the NMEA data has been consumed
45
+ * @param latestGPVTG Pointer to the latest GNSS NMEA GPVTG message (optional)
46
+ *
47
+ * @note Each pointer points to NULL when the NMEA data has been consumed.
48
+ */
49
+ void setNMEApointers (char *latestGPGGA, char *latestGPRMC, char *latestGPGST = nullptr , char *latestGPVTG = nullptr );
50
+
51
+ /* *
52
+ * @brief Set the pointer to the latest EA Session blob.
53
+ * E.g. NMEA GSA and GSV - from external GNSS.
54
+ *
55
+ * @param latestEASessionData Pointer to the latest EA Session blob.
56
+ *
57
+ * @note The latestEASessionData is passed to the EA Session as-is, (up to)
58
+ * 1000 bytes at a time.
59
+ * If must contain CRLF delimiters.
60
+ * It must be NULL-terminated as strlen is used to calculate the length.
61
+ * The pointer will point to NULL when the data has been consumed.
62
+ * Call latestEASessionDataIsBlocking before adding new data to
63
+ * latestEASessionData. Do not modify latestEASessionData if
64
+ * latestEASessionDataIsBlocking is true.
65
+ */
66
+ void setEASessionPointer (char *latestEASessionData);
67
+
68
+ /* *
69
+ * @brief Check if the latestEASessionData is in use (blocking)
70
+ *
71
+ * @return Returns `true` when the latestEASessionData is being written
72
+ * to the device, `false` otherwise.
73
+ *
74
+ * @note This is a poor man's semaphore. Super code threads / tasks should not update
75
+ * the latestEASessionData while latestEASessionDataIsBlocking is true.
46
76
*/
47
- void setNMEApointers ( char *latestGPGGA, char *latestGPRMC, char *latestGPGST = nullptr );
77
+ bool latestEASessionDataIsBlocking ( );
48
78
49
79
/* *
50
80
* @brief Enable debug prints on the selected Print stream
0 commit comments