\hypertarget{inv__mpu_8h_source}{}\doxysection{inv\+\_\+mpu.\+h}
\label{inv__mpu_8h_source}\index{D:/gitt/MicrochipFor32/bsp\_MPU6050/inv\_mpu.h@{D:/gitt/MicrochipFor32/bsp\_MPU6050/inv\_mpu.h}}
\mbox{\hyperlink{inv__mpu_8h}{浏览该文件的文档.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00001}00001 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00002}00002 \textcolor{comment}{ \$License:}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00003}00003 \textcolor{comment}{    Copyright (C) 2011-\/2012 InvenSense Corporation, All Rights Reserved.}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00004}00004 \textcolor{comment}{    See included License.txt for License information.}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00005}00005 \textcolor{comment}{ \$}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00006}00006 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00021}00021 \textcolor{preprocessor}{\#ifndef \_INV\_MPU\_H\_}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00022}00022 \textcolor{preprocessor}{\#define \_INV\_MPU\_H\_}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00023}00023 \textcolor{preprocessor}{\#include "{}main.h"{}}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00024}00024 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{varint_8h}{varint.h}}"{}}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00025}00025 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00026}00026 \textcolor{comment}{//定义输出速度}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00027}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga292d717406e906831952ce46612fe4cd}{00027}} \textcolor{preprocessor}{\#define DEFAULT\_MPU\_HZ  (100)       }\textcolor{comment}{//100Hz}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00029}\mbox{\hyperlink{group___d_r_i_v_e_r_s_gabf02bf28541421d59f8be764f2b95407}{00029}} \textcolor{preprocessor}{\#define INV\_X\_GYRO      (0x40)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00030}\mbox{\hyperlink{group___d_r_i_v_e_r_s_gacdd8ff833a34dba08ca2aa145eb92b44}{00030}} \textcolor{preprocessor}{\#define INV\_Y\_GYRO      (0x20)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00031}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga50205b5cc6089b33b2561c854eb8b0fd}{00031}} \textcolor{preprocessor}{\#define INV\_Z\_GYRO      (0x10)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00032}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga3fdc30f9c0a26c2c4e2bb88921f91629}{00032}} \textcolor{preprocessor}{\#define INV\_XYZ\_GYRO    (INV\_X\_GYRO | INV\_Y\_GYRO | INV\_Z\_GYRO)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00033}\mbox{\hyperlink{group___d_r_i_v_e_r_s_gaa03f025a17ed491e70b88274e89c75c5}{00033}} \textcolor{preprocessor}{\#define INV\_XYZ\_ACCEL   (0x08)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00034}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga7fc9c1dbdcb2ac8cc2a4128a5799482a}{00034}} \textcolor{preprocessor}{\#define INV\_XYZ\_COMPASS (0x01)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00036}00036 \textcolor{comment}{//移植官方MSP430 DMP驱动过来}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00037}\mbox{\hyperlink{structint__param__s}{00037}} \textcolor{keyword}{struct }\mbox{\hyperlink{structint__param__s}{int\_param\_s}} \{}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00038}00038 \textcolor{comment}{//\#if defined EMPL\_TARGET\_MSP430 || defined MOTION\_DRIVER\_TARGET\_MSP430}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00039}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga97093754f1f13b06492990e3da77965d}{00039}}     void (*\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga97093754f1f13b06492990e3da77965d}{cb}})(void);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00040}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5c682e1b664acf566f985b48dd7acbb7}{00040}}     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5c682e1b664acf566f985b48dd7acbb7}{pin}};}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00041}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga46dfad5a278a8b40a68d71beca0d2be4}{00041}}     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga46dfad5a278a8b40a68d71beca0d2be4}{lp\_exit}};}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00042}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga9b859a3332d9bd9287d5766494f261fb}{00042}}     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga9b859a3332d9bd9287d5766494f261fb}{active\_low}};}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00043}00043 \textcolor{comment}{//\#elif defined EMPL\_TARGET\_UC3L0}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00044}00044 \textcolor{comment}{//    unsigned long pin;}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00045}00045 \textcolor{comment}{//    void (*cb)(volatile void*);}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00046}00046 \textcolor{comment}{//    void *arg;}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00047}00047 \textcolor{comment}{//\#endif}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00048}00048 \};}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00050}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga0cddf0dffaf3bf65fd3ed92dda4f3193}{00050}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_DATA\_READY       (0x0001)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00051}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga380dd1ef256931e99302c371ad7752f4}{00051}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_DMP              (0x0002)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00052}\mbox{\hyperlink{group___d_r_i_v_e_r_s_gaa38d7976e86186bf353cb89ca7561f29}{00052}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_PLL\_READY        (0x0004)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00053}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5755e84f3a2e7d331f7612dbfea18ecc}{00053}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_I2C\_MST          (0x0008)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00054}\mbox{\hyperlink{group___d_r_i_v_e_r_s_gaf8e1684698ad837d0318a72b1ef73b13}{00054}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_FIFO\_OVERFLOW    (0x0010)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00055}\mbox{\hyperlink{group___d_r_i_v_e_r_s_gad5eee7ff393f842ca4ae969cc0019030}{00055}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_ZMOT             (0x0020)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00056}\mbox{\hyperlink{group___d_r_i_v_e_r_s_gaa1ab51fb5995e568edd425f8486cb2c8}{00056}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_MOT              (0x0040)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00057}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga000cfa5230cb895c6bad322856465552}{00057}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_FREE\_FALL        (0x0080)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00058}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga2398e82f93220e3cfa1ef31bfb6d76bd}{00058}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_DMP\_0            (0x0100)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00059}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5ac2e94db5083456fa531fceee0997f5}{00059}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_DMP\_1            (0x0200)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00060}\mbox{\hyperlink{group___d_r_i_v_e_r_s_gab7543433b9679174597e00e5d7cb6279}{00060}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_DMP\_2            (0x0400)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00061}\mbox{\hyperlink{group___d_r_i_v_e_r_s_gaea5cac4528bb19757de4eb4fa46a374f}{00061}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_DMP\_3            (0x0800)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00062}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga4345dc987e1b65ef8ddc6160f592e144}{00062}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_DMP\_4            (0x1000)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00063}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga101643480b83c302a4a3089fe9149e8e}{00063}} \textcolor{preprocessor}{\#define MPU\_INT\_STATUS\_DMP\_5            (0x2000)}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00065}00065 \textcolor{comment}{/* Set up APIs */}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00066}00066 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gac48a36b51e23bc4191ec13916bbb9d0b}{mpu\_init}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00067}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga9093183fe619360b3b1bfb8aab030592}{00067}} \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga9093183fe619360b3b1bfb8aab030592}{mpu\_init\_slave}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00068}00068 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga36f70f38371b48d81094d3b061233e15}{mpu\_set\_bypass}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} bypass\_on);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00070}00070 \textcolor{comment}{/* Configuration APIs */}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00071}00071 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga3a4fea75686ab7d2e68634e81ccac04c}{mpu\_lp\_accel\_mode}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} rate);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00072}00072 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga7d0b3259346898ccd1ba6ef78bf7df97}{mpu\_lp\_motion\_interrupt}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} thresh, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} time,}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00073}00073     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} lpa\_freq);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00074}00074 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gacc92fb1489ef32a04bcb6b0ebde4d657}{mpu\_set\_int\_level}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} active\_low);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00075}00075 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga653cb855300bff9285ce4b8dca6a503b}{mpu\_set\_int\_latched}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} enable);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00077}00077 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga68ed20e6c9663cd7c50469329af8715f}{mpu\_set\_dmp\_state}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} enable);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00078}00078 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gafe0f60ed0d7f8fd2dcd55d45b95a2363}{mpu\_get\_dmp\_state}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *enabled);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00080}00080 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaa95c7e216dcb2d888e9796001ca555f8}{mpu\_get\_lpf}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} *lpf);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00081}00081 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5661a9dee25152166769910767a2a93d}{mpu\_set\_lpf}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} lpf);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00082}00082 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00083}00083 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaf973c32c73ba912ff512aab948fc31ca}{mpu\_get\_gyro\_fsr}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} *fsr);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00084}00084 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gad09e6031c8677adc0b8a39b6deea8e27}{mpu\_set\_gyro\_fsr}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} fsr);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00086}00086 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gab6087a15ee23db23b6aec41590329a60}{mpu\_get\_accel\_fsr}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *fsr);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00087}00087 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga2713a96af104cfb2ae8e0ed4c3718119}{mpu\_set\_accel\_fsr}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} fsr);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00089}00089 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gade8589573d09e0f14b84130428f286df}{mpu\_get\_compass\_fsr}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} *fsr);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00091}00091 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga023c0cc94aa8f162dc33b15048a49421}{mpu\_get\_gyro\_sens}}(\textcolor{keywordtype}{float} *sens);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00092}00092 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga620408949052b96e856cad920f856583}{mpu\_get\_accel\_sens}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} *sens);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00094}00094 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga2487dd551b701c1c7ed4d6335f02b2f1}{mpu\_get\_sample\_rate}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} *rate);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00095}00095 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga0144d666a67a82888b8580002afe8b55}{mpu\_set\_sample\_rate}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} rate);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00096}00096 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gab5a45cd7783f6937788c0decb0b18b16}{mpu\_get\_compass\_sample\_rate}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} *rate);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00097}00097 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga78da3828de0ef9d080c4d03e7bc45e7b}{mpu\_set\_compass\_sample\_rate}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} rate);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00099}00099 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga093f11eb10b2639a4b9fe344ea348c54}{mpu\_get\_fifo\_config}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *sensors);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00100}00100 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gababbdda287e1f19323489f90a0889dd7}{mpu\_configure\_fifo}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} sensors);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00102}00102 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaec8fa7a067988d174516bb735a4a0bc9}{mpu\_get\_power\_state}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *power\_on);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00103}00103 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga6e77e7cc1cf6be5e8fdf617c5b4586d1}{mpu\_set\_sensors}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} sensors);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00105}00105 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga4968cc2ec80f0da0d72436551c81f134}{mpu\_set\_accel\_bias}}(\textcolor{keyword}{const} \textcolor{keywordtype}{long} *accel\_bias);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00107}00107 \textcolor{comment}{/* Data getter/setter APIs */}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00108}00108 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5555854590ad11495c0e30401294bae2}{mpu\_get\_gyro\_reg}}(\textcolor{keywordtype}{short} *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *timestamp);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00109}00109 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gae4ae960e5df78049ece2647772a3d809}{mpu\_get\_accel\_reg}}(\textcolor{keywordtype}{short} *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *timestamp);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00110}00110 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga65e6b0ce980b8c0255d7be9b55c88c08}{mpu\_get\_compass\_reg}}(\textcolor{keywordtype}{short} *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *timestamp);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00111}00111 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaa449b565a157b4b8ca0f491b7ed46018}{mpu\_get\_temperature}}(\textcolor{keywordtype}{long} *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *timestamp);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00112}00112 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00113}00113 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga0afd02d8c76d3278b488ef7038c26e3e}{mpu\_get\_int\_status}}(\textcolor{keywordtype}{short} *status);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00114}00114 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga2da20453aafbbba4a0f6fb9fbdd25572}{mpu\_read\_fifo}}(\textcolor{keywordtype}{short} *gyro, \textcolor{keywordtype}{short} *accel, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *timestamp,}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00115}00115     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *sensors, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *more);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00116}00116 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga13593044949b460e9f571eb57e9a0788}{mpu\_read\_fifo\_stream}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} length, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *data,}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00117}00117     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *more);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00118}00118 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaf23e9f57c0059be6ec57862f0584de10}{mpu\_reset\_fifo}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00119}00119 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00120}00120 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gafea59910bc3dd30ba3356b1c75213a5f}{mpu\_write\_mem}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} mem\_addr, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} length,}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00121}00121     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *data);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00122}00122 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga3374bececb6743893c9eab27645c1182}{mpu\_read\_mem}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} mem\_addr, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} length,}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00123}00123     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *data);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00124}00124 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga8fbdfe1a50285d4ab438e29c2efc70f5}{mpu\_load\_firmware}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} length, \textcolor{keyword}{const} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *firmware,}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00125}00125     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} start\_addr, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} sample\_rate);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00127}00127 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga0e1201ecfd8453f1d89e4299528baaf6}{mpu\_reg\_dump}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00128}00128 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5c35a3363337014e11769a0ea7c0dfa9}{mpu\_read\_reg}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5448c351fc95ff052b110eee80e5f75c}{reg}}, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *data);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00129}00129 \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga3773dc98eb1ba15da0091ae75abcf62f}{mpu\_run\_self\_test}}(\textcolor{keywordtype}{long} *gyro, \textcolor{keywordtype}{long} *accel);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00130}\mbox{\hyperlink{group___d_r_i_v_e_r_s_ga0d528114a4e355a10ffd354a4c89a17f}{00130}} \textcolor{keywordtype}{int} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga0d528114a4e355a10ffd354a4c89a17f}{mpu\_register\_tap\_cb}}(\textcolor{keywordtype}{void} (*func)(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char}, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char}));}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00131}00131 \textcolor{comment}{//自行添加的一些函数}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00132}00132 \textcolor{keywordtype}{void} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gafa3071c8321f6e8dd2036be8a1e57ad0}{mget\_ms}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *time);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00133}00133 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga2b58dae1c0567f3f9f6dcbfb07476de7}{inv\_row\_2\_scale}}(\textcolor{keyword}{const} \textcolor{keywordtype}{signed} \textcolor{keywordtype}{char} *row);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00134}00134 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga3ff6037a69f37bb6174355936ad67ef3}{inv\_orientation\_matrix\_to\_scalar}}(\textcolor{keyword}{const} \textcolor{keywordtype}{signed} \textcolor{keywordtype}{char} *mtx);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00135}00135 \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaff893f93277595387023c71d46b03c42}{run\_self\_test}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00136}00136 \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gafac8fcbf24cfa1b69737e02238580f3a}{mpu\_dmp\_init}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00137}00137 \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{group___d_r_i_v_e_r_s_gacb825f2fd99c3044d012a9b25608cc18}{mpu\_dmp\_get\_data}}(\textcolor{keywordtype}{float} *pitch,\textcolor{keywordtype}{float} *roll,\textcolor{keywordtype}{float} *yaw);}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00139}00139 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* \#ifndef \_INV\_MPU\_H\_ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{inv__mpu_8h_source_l00140}00140 }

\end{DoxyCode}
