* adding accel-neutral-settings API proposal
[libnomaccel] / src / global_p.h
index 4841845..03ddd51 100644 (file)
@@ -35,6 +35,12 @@ struct _NomAccelProxy {
        angle roll;
 };
 
+typedef struct _NomAccelNeutral NomAccelNeutral;
+struct _NomAccelNeutral {
+       angle pitch_neutral;
+       angle roll_neutral;
+};
+
 void _accel_proxy_init ();
 void _accel_proxy_finit ();
 void _accel_read_real_values ();
@@ -42,7 +48,13 @@ void _accel_recalculate_pitch ();
 void _accel_recalculate_roll ();
 #define _accel_recalculate_pitch_roll() _accel_recalculate_pitch(); _accel_recalculate_roll()
 
+void _accel_nsettings_read_system ();
+void _accel_nsettings_save_system ();
+
 const char* const _accel_device_file_name = "/sys/class/i2c-adapter/i2c-3/3-001d/coord";
-NomAccelProxy     _accel_proxy = {0};
+const char* const _accel_system_setting_file_name = "/etc/nomaccel/settings";
+extern NomAccelProxy     _accel_proxy;
+extern NomAccelNeutral   _accel_settings[NOM_ACCEL_SETTINGS_NUMBER];
+extern NomAccelNeutralSetting _accel_settings_current;
 
 #endif