Lines Matching refs:g_prms
28 static AK8975PRMS g_prms; variable
49 memset(&g_prms, 0, sizeof(AK8975PRMS)); in AKFS_Init()
52 g_prms.mfv_hs.u.x = AK8975_HSENSE_DEFAULT; in AKFS_Init()
53 g_prms.mfv_hs.u.y = AK8975_HSENSE_DEFAULT; in AKFS_Init()
54 g_prms.mfv_hs.u.z = AK8975_HSENSE_DEFAULT; in AKFS_Init()
55 g_prms.mfv_as.u.x = AK8975_ASENSE_DEFAULT; in AKFS_Init()
56 g_prms.mfv_as.u.y = AK8975_ASENSE_DEFAULT; in AKFS_Init()
57 g_prms.mfv_as.u.z = AK8975_ASENSE_DEFAULT; in AKFS_Init()
60 g_prms.mi_hnaveV = CSPEC_HNAVE_V; in AKFS_Init()
61 g_prms.mi_hnaveD = CSPEC_HNAVE_D; in AKFS_Init()
62 g_prms.mi_anaveV = CSPEC_ANAVE_V; in AKFS_Init()
63 g_prms.mi_anaveD = CSPEC_ANAVE_D; in AKFS_Init()
66 g_prms.mi_asa.u.x = regs[0]; in AKFS_Init()
67 g_prms.mi_asa.u.y = regs[1]; in AKFS_Init()
68 g_prms.mi_asa.u.z = regs[2]; in AKFS_Init()
71 g_prms.m_hpat = hpat; in AKFS_Init()
99 if (AKFS_LoadParameters(&g_prms, path) != AKM_SUCCESS) { in AKFS_Start()
104 AKFS_InitBuffer(AKFS_HDATA_SIZE, g_prms.mfv_hdata); in AKFS_Start()
105 AKFS_InitBuffer(AKFS_HDATA_SIZE, g_prms.mfv_hvbuf); in AKFS_Start()
106 AKFS_InitBuffer(AKFS_ADATA_SIZE, g_prms.mfv_adata); in AKFS_Start()
107 AKFS_InitBuffer(AKFS_ADATA_SIZE, g_prms.mfv_avbuf); in AKFS_Start()
110 AKFS_InitAOC(&g_prms.m_aocv); in AKFS_Start()
112 g_prms.mi_hstatus = 0; in AKFS_Start()
130 if (AKFS_SaveParameters(&g_prms, path) != AKM_SUCCESS) { in AKFS_Stop()
173 &g_prms.mi_asa, in AKFS_Get_MAGNETIC_FIELD()
175 g_prms.mfv_hdata in AKFS_Get_MAGNETIC_FIELD()
184 g_prms.m_hpat, in AKFS_Get_MAGNETIC_FIELD()
185 &g_prms.mfv_hdata[0] in AKFS_Get_MAGNETIC_FIELD()
195 &g_prms.m_aocv, in AKFS_Get_MAGNETIC_FIELD()
196 g_prms.mfv_hdata, in AKFS_Get_MAGNETIC_FIELD()
197 &g_prms.mfv_ho in AKFS_Get_MAGNETIC_FIELD()
204 g_prms.mfv_hdata, in AKFS_Get_MAGNETIC_FIELD()
206 &g_prms.mfv_ho, in AKFS_Get_MAGNETIC_FIELD()
207 &g_prms.mfv_hs, in AKFS_Get_MAGNETIC_FIELD()
210 g_prms.mfv_hvbuf in AKFS_Get_MAGNETIC_FIELD()
220 g_prms.mfv_hvbuf, in AKFS_Get_MAGNETIC_FIELD()
222 &g_prms.mfv_hvec in AKFS_Get_MAGNETIC_FIELD()
231 (g_prms.mfv_hvec.u.x * g_prms.mfv_hvec.u.x) + in AKFS_Get_MAGNETIC_FIELD()
232 (g_prms.mfv_hvec.u.y * g_prms.mfv_hvec.u.y) + in AKFS_Get_MAGNETIC_FIELD()
233 (g_prms.mfv_hvec.u.z * g_prms.mfv_hvec.u.z)); in AKFS_Get_MAGNETIC_FIELD()
236 g_prms.mi_hstatus = 0; in AKFS_Get_MAGNETIC_FIELD()
239 g_prms.mi_hstatus = 3; in AKFS_Get_MAGNETIC_FIELD()
243 *vx = g_prms.mfv_hvec.u.x; in AKFS_Get_MAGNETIC_FIELD()
244 *vy = g_prms.mfv_hvec.u.y; in AKFS_Get_MAGNETIC_FIELD()
245 *vz = g_prms.mfv_hvec.u.z; in AKFS_Get_MAGNETIC_FIELD()
246 *accuracy = g_prms.mi_hstatus; in AKFS_Get_MAGNETIC_FIELD()
289 g_prms.mfv_adata in AKFS_Get_ACCELEROMETER()
291 g_prms.mfv_adata[0].u.x = acc[0]; in AKFS_Get_ACCELEROMETER()
292 g_prms.mfv_adata[0].u.y = acc[1]; in AKFS_Get_ACCELEROMETER()
293 g_prms.mfv_adata[0].u.z = acc[2]; in AKFS_Get_ACCELEROMETER()
299 g_prms.mfv_adata, in AKFS_Get_ACCELEROMETER()
301 &g_prms.mfv_ao, in AKFS_Get_ACCELEROMETER()
302 &g_prms.mfv_as, in AKFS_Get_ACCELEROMETER()
305 g_prms.mfv_avbuf in AKFS_Get_ACCELEROMETER()
315 g_prms.mfv_avbuf, in AKFS_Get_ACCELEROMETER()
317 &g_prms.mfv_avec in AKFS_Get_ACCELEROMETER()
328 *vx = g_prms.mfv_avec.u.x; in AKFS_Get_ACCELEROMETER()
329 *vy = g_prms.mfv_avec.u.y; in AKFS_Get_ACCELEROMETER()
330 *vz = g_prms.mfv_avec.u.z; in AKFS_Get_ACCELEROMETER()
365 g_prms.mfv_hvbuf, in AKFS_Get_ORIENTATION()
368 g_prms.mfv_avbuf, in AKFS_Get_ORIENTATION()
370 &g_prms.mf_azimuth, in AKFS_Get_ORIENTATION()
371 &g_prms.mf_pitch, in AKFS_Get_ORIENTATION()
372 &g_prms.mf_roll in AKFS_Get_ORIENTATION()
379 *azimuth = g_prms.mf_azimuth; in AKFS_Get_ORIENTATION()
380 *pitch = g_prms.mf_pitch; in AKFS_Get_ORIENTATION()
381 *roll = g_prms.mf_roll; in AKFS_Get_ORIENTATION()
382 *accuracy = g_prms.mi_hstatus; in AKFS_Get_ORIENTATION()