|
GPS Device
|
Public functions to interact with the data log subsystem. More...

Functions | |
| ERR_te | datalog_init_subsys (void) |
| Initializes the data log subsystem. | |
| ERR_te | datalog_deinit_subsys (void) |
| Deinitializes the data log subsystem. | |
| ERR_te | datalog_start_subsys (void) |
| Starts the data log subsystem. | |
| ERR_te | datalog_stop_subsys (void) |
| Stops the data log subsystem. | |
| ERR_te | datalog_init_handle (DATALOG_CFG_ts const *datalog_cfg, DATALOG_HANDLE_ts **datalog_handle_o) |
| Initializes and registers a data log handle. | |
| ERR_te | datalog_deinit_handle (DATALOG_HANDLE_ts const *datalog_handle) |
| Deinitializes a data log handle. | |
| ERR_te | datalog_run_handle (DATALOG_HANDLE_ts *datalog_handle) |
| Writes a GPS data entry to the log file if the logging interval has elapsed. | |
Public functions to interact with the data log subsystem.
| ERR_te datalog_init_subsys | ( | void | ) |
Initializes the data log subsystem.
Resets the internal state, sets up dependencies (log, systick, NEO-6), and registers the subsystem CLI commands.
Must be called before any other data log API function.
Definition at line 137 of file datalog.c.


| ERR_te datalog_deinit_subsys | ( | void | ) |
Deinitializes the data log subsystem.
Resets the internal state to zero and deregisters the CLI commands.
Definition at line 174 of file datalog.c.

| ERR_te datalog_start_subsys | ( | void | ) |
Starts the data log subsystem.
Enables runtime processing. After calling this function, datalog_run_handle will perform log writes on schedule.
Definition at line 199 of file datalog.c.

| ERR_te datalog_stop_subsys | ( | void | ) |
Stops the data log subsystem.
Disables runtime processing. After calling this function, no new log entries will be written.
Definition at line 223 of file datalog.c.
| ERR_te datalog_init_handle | ( | DATALOG_CFG_ts const * | datalog_cfg, |
| DATALOG_HANDLE_ts ** | datalog_handle_o ) |
Initializes and registers a data log handle.
Mounts the FatFs filesystem, creates or truncates the log file (0:datalog.txt), and allocates an internal handle from the pool.
| [in] | datalog_cfg | Pointer to the log configuration structure. |
| [out] | datalog_handle_o | Pointer to a handle pointer that will be set to the allocated log instance. |
datalog_cfg is NULLDefinition at line 247 of file datalog.c.


| ERR_te datalog_deinit_handle | ( | DATALOG_HANDLE_ts const * | datalog_handle | ) |
Deinitializes a data log handle.
Releases the internal resources associated with the given handle and marks the slot as available for reuse.
| [in] | datalog_handle | Pointer to the handle to deinitialize. |
Definition at line 329 of file datalog.c.

| ERR_te datalog_run_handle | ( | DATALOG_HANDLE_ts * | datalog_handle | ) |
Writes a GPS data entry to the log file if the logging interval has elapsed.
Checks whether the configured interval has passed since the last write. If so, opens 0:datalog.txt in append mode and writes the following fields from the NEO-6 GPS module, each on its own line: time, latitude, longitude, orthometric height, movement speed, and movement direction. A blank line is appended after each entry.
Returns immediately without writing if the interval has not yet elapsed.
| [in,out] | datalog_handle | Pointer to the handle to run. |
Definition at line 384 of file datalog.c.

