Added global gps store
This commit is contained in:
11
src/data/gps_store.cpp
Normal file
11
src/data/gps_store.cpp
Normal file
@@ -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);
|
||||||
|
}
|
||||||
8
src/data/gps_store.h
Normal file
8
src/data/gps_store.h
Normal file
@@ -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);
|
||||||
Reference in New Issue
Block a user