Home | History | Annotate | Download | only in akmdfs
      1 /******************************************************************************
      2  * $Id: AKFS_Disp.h 580 2012-03-29 09:56:21Z yamada.rj $
      3  ******************************************************************************
      4  *
      5  * Copyright (C) 2012 Asahi Kasei Microdevices Corporation, Japan
      6  *
      7  * Licensed under the Apache License, Version 2.0 (the "License");
      8  * you may not use this file except in compliance with the License.
      9  * You may obtain a copy of the License at
     10  *
     11  *      http://www.apache.org/licenses/LICENSE-2.0
     12  *
     13  * Unless required by applicable law or agreed to in writing, software
     14  * distributed under the License is distributed on an "AS IS" BASIS,
     15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16  * See the License for the specific language governing permissions and
     17  * limitations under the License.
     18  */
     19 #ifndef AKFS_INC_DISP_H
     20 #define AKFS_INC_DISP_H
     21 
     22 /* Include file for AK8975 library. */
     23 #include "AKFS_Compass.h"
     24 
     25 /*** Constant definition ******************************************************/
     26 #define REVERT_ACC(a)	((float)((a) * 9.8f / 720.0f))
     27 #define REVERT_MAG(m)	((float)((m) * 0.06f))
     28 #define REVERT_ORI(o)	((float)((o) / 64.0f))
     29 
     30 /*** Type declaration *********************************************************/
     31 
     32 /*! These defined types represents the current mode. */
     33 typedef enum _MODE {
     34 	MODE_ERROR,			/*!< Error */
     35 	MODE_Measure,		/*!< Measurement */
     36 	MODE_SelfTest,		/*!< Self-test */
     37 	MODE_Quit			/*!< Quit */
     38 } MODE;
     39 
     40 /*** Prototype of function ****************************************************/
     41 /*
     42 	Disp_   : Display messages.
     43 	Menu_   : Display menu (two or more selection) and wait for user input.
     44  */
     45 
     46 void Disp_StartMessage(void);
     47 void Disp_EndMessage(int ret);
     48 void Disp_Result(int buf[YPR_DATA_SIZE]);
     49 
     50 MODE Menu_Main(void);
     51 
     52 #endif
     53 
     54