2022-11-08 01:47:39 +08:00
\hypertarget { inv_ _ mpu_ 8h_ source} { } \doxysection { inv\+ \_ \+ mpu.\+ h}
2022-11-22 03:43:24 +08:00
\label { inv_ _ mpu_ 8h_ source} \index { D:/gitt/MicrochipFor32/bsp\_ MPU6050/inv\_ mpu.h@{ D:/gitt/MicrochipFor32/bsp\_ MPU6050/inv\_ mpu.h} }
2022-11-08 01:47:39 +08:00
\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}