X-Git-Url: http://git.maemo.org/git/?p=libnomaccel;a=blobdiff_plain;f=include%2Faccel.h;h=38bd3859423d2cf16447543068f3dc1c6ecb512b;hp=9863530446dbe5a3b697e379a80e4d27b790c929;hb=HEAD;hpb=718b114789f33651f138b33e7d39d80b028c98c6 diff --git a/include/accel.h b/include/accel.h index 9863530..38bd385 100644 --- a/include/accel.h +++ b/include/accel.h @@ -23,6 +23,14 @@ typedef int value; typedef float angle; +typedef struct { + value x; + value y; + value z; + angle pitch; + angle roll; +} NomAccelCache; + /* simplest retrieving functions: x,y,z,pitch,roll */ value nom_accel_get_x (); value nom_accel_get_y (); @@ -37,5 +45,11 @@ void nom_accel_get_all ( value* x, value* y, value* z, angle* pitch, angle* roll ); +void nom_accel_cache_get (NomAccelCache* put_to); +#define nom_accel_cache_get_x(cache) ((cache)->x) +#define nom_accel_cache_get_y(cache) ((cache)->y) +#define nom_accel_cache_get_z(cache) ((cache)->z) +#define nom_accel_cache_get_pitch(cache) ((cache)->pitch) +#define nom_accel_cache_get_roll(cache) ((cache)->roll) #endif