diff --git a/src/data/gps_store.cpp b/src/data/gps_store.cpp new file mode 100644 index 0000000..cdbc84c --- /dev/null +++ b/src/data/gps_store.cpp @@ -0,0 +1,11 @@ +#include "gps_store.h" + + volatile gps_data gps_data_global = {}; + + void gps_read(gps_data& out) { + gps_copy_from_volatile(out, gps_data_global); + } + + void gps_write(const gps_data& in) { + gps_copy_to_volatile(gps_data_global, in); + } \ No newline at end of file diff --git a/src/data/gps_store.h b/src/data/gps_store.h new file mode 100644 index 0000000..dd6a722 --- /dev/null +++ b/src/data/gps_store.h @@ -0,0 +1,8 @@ +#pragma once + +#include "custom_types.h" + +extern volatile gps_data gps_data_global; + +void gps_global_read(gps_data& out); +void gps_global_write(const gps_data& in); \ No newline at end of file