static int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gafd5ebff6b0179e1dce0b68c2272cae07}{set\+\_\+int\+\_\+enable}} (unsigned char enable)
\begin{DoxyCompactList}\small\item\em Enable/disable data ready interrupt. If the DMP is on, the DMP interrupt is enabled. Otherwise, the data ready interrupt is used. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga0e1201ecfd8453f1d89e4299528baaf6}{mpu\+\_\+reg\+\_\+dump}} (void)
\begin{DoxyCompactList}\small\item\em Register dump for testing. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5c35a3363337014e11769a0ea7c0dfa9}{mpu\+\_\+read\+\_\+reg}} (unsigned char \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5448c351fc95ff052b110eee80e5f75c}{reg}}, unsigned char $\ast$data)
\begin{DoxyCompactList}\small\item\em Read from a single register. NOTE\+: The memory and FIFO read/write registers cannot be accessed. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gac48a36b51e23bc4191ec13916bbb9d0b}{mpu\+\_\+init}} (void)
Data ready interrupt\+: Disabled, active low, unlatched. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga3a4fea75686ab7d2e68634e81ccac04c}{mpu\+\_\+lp\+\_\+accel\+\_\+mode}} (unsigned char rate)
\begin{DoxyCompactList}\small\item\em Enter low-\/power accel-\/only mode. In low-\/power accel mode, the chip goes to sleep and only wakes up to sample the accelerometer at one of the following frequencies\+: ~\newline
If the requested rate is not one listed above, the device will be set to the next highest rate. Requesting a rate above the maximum supported frequency will result in an error. ~\newline
To select a fractional wake-\/up frequency, round down the value passed to {\itshape rate}. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5555854590ad11495c0e30401294bae2}{mpu\+\_\+get\+\_\+gyro\+\_\+reg}} (short $\ast$data, unsigned long $\ast$timestamp)
\begin{DoxyCompactList}\small\item\em Read raw gyro data directly from the registers. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gae4ae960e5df78049ece2647772a3d809}{mpu\+\_\+get\+\_\+accel\+\_\+reg}} (short $\ast$data, unsigned long $\ast$timestamp)
\begin{DoxyCompactList}\small\item\em Read raw accel data directly from the registers. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaa449b565a157b4b8ca0f491b7ed46018}{mpu\+\_\+get\+\_\+temperature}} (long $\ast$data, unsigned long $\ast$timestamp)
\begin{DoxyCompactList}\small\item\em Read temperature data directly from the registers. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga4968cc2ec80f0da0d72436551c81f134}{mpu\+\_\+set\+\_\+accel\+\_\+bias}} (const long $\ast$accel\+\_\+bias)
\begin{DoxyCompactList}\small\item\em Push biases to the accel bias registers. This function expects biases relative to the current sensor output, and these biases will be added to the factory-\/supplied values. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaf23e9f57c0059be6ec57862f0584de10}{mpu\+\_\+reset\+\_\+fifo}} (void)
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaf973c32c73ba912ff512aab948fc31ca}{mpu\+\_\+get\+\_\+gyro\+\_\+fsr}} (unsigned short $\ast$fsr)
\begin{DoxyCompactList}\small\item\em Get the gyro full-\/scale range. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gad09e6031c8677adc0b8a39b6deea8e27}{mpu\+\_\+set\+\_\+gyro\+\_\+fsr}} (unsigned short fsr)
\begin{DoxyCompactList}\small\item\em Set the gyro full-\/scale range. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gab6087a15ee23db23b6aec41590329a60}{mpu\+\_\+get\+\_\+accel\+\_\+fsr}} (unsigned char $\ast$fsr)
\begin{DoxyCompactList}\small\item\em Get the accel full-\/scale range. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga2713a96af104cfb2ae8e0ed4c3718119}{mpu\+\_\+set\+\_\+accel\+\_\+fsr}} (unsigned char fsr)
\begin{DoxyCompactList}\small\item\em Set the accel full-\/scale range. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaa95c7e216dcb2d888e9796001ca555f8}{mpu\+\_\+get\+\_\+lpf}} (unsigned short $\ast$lpf)
\begin{DoxyCompactList}\small\item\em Get the current DLPF setting. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga5661a9dee25152166769910767a2a93d}{mpu\+\_\+set\+\_\+lpf}} (unsigned short lpf)
\begin{DoxyCompactList}\small\item\em Set digital low pass filter. The following LPF settings are supported\+: 188, 98, 42, 20, 10, 5. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga2487dd551b701c1c7ed4d6335f02b2f1}{mpu\+\_\+get\+\_\+sample\+\_\+rate}} (unsigned short $\ast$rate)
\begin{DoxyCompactList}\small\item\em Get sampling rate. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga0144d666a67a82888b8580002afe8b55}{mpu\+\_\+set\+\_\+sample\+\_\+rate}} (unsigned short rate)
\begin{DoxyCompactList}\small\item\em Set sampling rate. Sampling rate must be between 4Hz and 1k\+Hz. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gab5a45cd7783f6937788c0decb0b18b16}{mpu\+\_\+get\+\_\+compass\+\_\+sample\+\_\+rate}} (unsigned short $\ast$rate)
\begin{DoxyCompactList}\small\item\em Get compass sampling rate. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga78da3828de0ef9d080c4d03e7bc45e7b}{mpu\+\_\+set\+\_\+compass\+\_\+sample\+\_\+rate}} (unsigned short rate)
\begin{DoxyCompactList}\small\item\em Set compass sampling rate. The compass on the auxiliary I2C bus is read by the MPU hardware at a maximum of 100Hz. The actual rate can be set to a fraction of the gyro sampling rate. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga023c0cc94aa8f162dc33b15048a49421}{mpu\+\_\+get\+\_\+gyro\+\_\+sens}} (float $\ast$sens)
\begin{DoxyCompactList}\small\item\em Get gyro sensitivity scale factor. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga620408949052b96e856cad920f856583}{mpu\+\_\+get\+\_\+accel\+\_\+sens}} (unsigned short $\ast$sens)
\begin{DoxyCompactList}\small\item\em Get accel sensitivity scale factor. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga093f11eb10b2639a4b9fe344ea348c54}{mpu\+\_\+get\+\_\+fifo\+\_\+config}} (unsigned char $\ast$sensors)
\begin{DoxyCompactList}\small\item\em Get current FIFO configuration. {\itshape sensors} can contain a combination of the following flags\+: ~\newline
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gababbdda287e1f19323489f90a0889dd7}{mpu\+\_\+configure\+\_\+fifo}} (unsigned char sensors)
\begin{DoxyCompactList}\small\item\em Select which sensors are pushed to FIFO. {\itshape sensors} can contain a combination of the following flags\+: ~\newline
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaec8fa7a067988d174516bb735a4a0bc9}{mpu\+\_\+get\+\_\+power\+\_\+state}} (unsigned char $\ast$power\+\_\+on)
\begin{DoxyCompactList}\small\item\em Get current power state. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga6e77e7cc1cf6be5e8fdf617c5b4586d1}{mpu\+\_\+set\+\_\+sensors}} (unsigned char sensors)
\begin{DoxyCompactList}\small\item\em Turn specific sensors on/off. {\itshape sensors} can contain a combination of the following flags\+: ~\newline
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga0afd02d8c76d3278b488ef7038c26e3e}{mpu\+\_\+get\+\_\+int\+\_\+status}} (short $\ast$status)
\begin{DoxyCompactList}\small\item\em Read the MPU interrupt status registers. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga2da20453aafbbba4a0f6fb9fbdd25572}{mpu\+\_\+read\+\_\+fifo}} (short $\ast$gyro, short $\ast$accel, unsigned long $\ast$timestamp, unsigned char $\ast$sensors, unsigned char $\ast$more)
\begin{DoxyCompactList}\small\item\em Get one packet from the FIFO. If {\itshape sensors} does not contain a particular sensor, disregard the data returned to that pointer. ~\newline
{\itshape sensors} can contain a combination of the following flags\+: ~\newline
If the FIFO has no new data, {\itshape sensors} will be zero. ~\newline
If the FIFO is disabled, {\itshape sensors} will be zero and this function will return a non-\/zero error code. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga13593044949b460e9f571eb57e9a0788}{mpu\+\_\+read\+\_\+fifo\+\_\+stream}} (unsigned short length, unsigned char $\ast$data, unsigned char $\ast$more)
\begin{DoxyCompactList}\small\item\em Get one unparsed packet from the FIFO. This function should be used if the packet is to be parsed elsewhere. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga36f70f38371b48d81094d3b061233e15}{mpu\+\_\+set\+\_\+bypass}} (unsigned char bypass\+\_\+on)
\begin{DoxyCompactList}\small\item\em Set device to bypass mode. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gacc92fb1489ef32a04bcb6b0ebde4d657}{mpu\+\_\+set\+\_\+int\+\_\+level}} (unsigned char active\+\_\+low)
\begin{DoxyCompactList}\small\item\em Set interrupt level. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga653cb855300bff9285ce4b8dca6a503b}{mpu\+\_\+set\+\_\+int\+\_\+latched}} (unsigned char enable)
\begin{DoxyCompactList}\small\item\em Enable latched interrupts. Any MPU register will clear the interrupt. \end{DoxyCompactList}\item
static int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gab7ebbe13328466605a20f6ce1a106de8}{get\+\_\+accel\+\_\+prod\+\_\+shift}} (float $\ast$st\+\_\+shift)
\item
static int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gaab48ddb3bd05cea3f0fc85a68db9934d}{accel\+\_\+self\+\_\+test}} (long $\ast$bias\+\_\+regular, long $\ast$bias\+\_\+st)
\item
static int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga267d6f443d5be8b2a7a06aa007116f7a}{gyro\+\_\+self\+\_\+test}} (long $\ast$bias\+\_\+regular, long $\ast$bias\+\_\+st)
\item
static int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga8d087842b07e9710be2267adea4b497a}{get\+\_\+st\+\_\+biases}} (long $\ast$gyro, long $\ast$accel, unsigned char hw\+\_\+test)
\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga3773dc98eb1ba15da0091ae75abcf62f}{mpu\+\_\+run\+\_\+self\+\_\+test}} (long $\ast$gyro, long $\ast$accel)
\begin{DoxyCompactList}\small\item\em Trigger gyro/accel/compass self-\/test. On success/error, the self-\/test returns a mask representing the sensor(s) that failed. For each bit, a one (1) represents a \char`\"{}pass\char`\"{} case; conversely, a zero (0) indicates a failure. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gafea59910bc3dd30ba3356b1c75213a5f}{mpu\+\_\+write\+\_\+mem}} (unsigned short mem\+\_\+addr, unsigned short length, unsigned char $\ast$data)
\begin{DoxyCompactList}\small\item\em Write to the DMP memory. This function prevents I2C writes past the bank boundaries. The DMP memory is only accessible when the chip is awake. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga3374bececb6743893c9eab27645c1182}{mpu\+\_\+read\+\_\+mem}} (unsigned short mem\+\_\+addr, unsigned short length, unsigned char $\ast$data)
\begin{DoxyCompactList}\small\item\em Read from the DMP memory. This function prevents I2C reads past the bank boundaries. The DMP memory is only accessible when the chip is awake. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga8fbdfe1a50285d4ab438e29c2efc70f5}{mpu\+\_\+load\+\_\+firmware}} (unsigned short length, const unsigned char $\ast$firmware, unsigned short start\+\_\+addr, unsigned short sample\+\_\+rate)
\begin{DoxyCompactList}\small\item\em Load and verify DMP image. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga68ed20e6c9663cd7c50469329af8715f}{mpu\+\_\+set\+\_\+dmp\+\_\+state}} (unsigned char enable)
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gafe0f60ed0d7f8fd2dcd55d45b95a2363}{mpu\+\_\+get\+\_\+dmp\+\_\+state}} (unsigned char $\ast$enabled)
\begin{DoxyCompactList}\small\item\em Get DMP state. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga4764ce0ba4e07a4c774f69ab3b83d1f9}{setup\+\_\+compass}} (void)
\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga65e6b0ce980b8c0255d7be9b55c88c08}{mpu\+\_\+get\+\_\+compass\+\_\+reg}} (short $\ast$data, unsigned long $\ast$timestamp)
\begin{DoxyCompactList}\small\item\em Read raw compass data. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_gade8589573d09e0f14b84130428f286df}{mpu\+\_\+get\+\_\+compass\+\_\+fsr}} (unsigned short $\ast$fsr)
\begin{DoxyCompactList}\small\item\em Get the compass full-\/scale range. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga7d0b3259346898ccd1ba6ef78bf7df97}{mpu\+\_\+lp\+\_\+motion\+\_\+interrupt}} (unsigned short thresh, unsigned char time, unsigned char lpa\+\_\+freq)
\begin{DoxyCompactList}\small\item\em Enters LP accel motion interrupt mode. The behavior of this feature is very different between the MPU6050 and the MPU6500. Each chip\textquotesingle{}s version of this feature is explained below. \end{DoxyCompactList}\item
unsigned short \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga3ff6037a69f37bb6174355936ad67ef3}{inv\+\_\+orientation\+\_\+matrix\+\_\+to\+\_\+scalar}} (const signed char $\ast$mtx)
\item
unsigned short \mbox{\hyperlink{group___d_r_i_v_e_r_s_ga2b58dae1c0567f3f9f6dcbfb07476de7}{inv\+\_\+row\+\_\+2\+\_\+scale}} (const signed char $\ast$row)
\item
void \mbox{\hyperlink{group___d_r_i_v_e_r_s_gafa3071c8321f6e8dd2036be8a1e57ad0}{mget\+\_\+ms}} (unsigned long $\ast$time)
static signed char \mbox{\hyperlink{group___d_r_i_v_e_r_s_gadcca9e3dfdbc53cc5509fabdaede02b8}{gyro\+\_\+orientation}}\mbox{[}9\mbox{]}
\end{DoxyCompactItemize}
\doxysubsection{详细描述}
An I2\+C-\/based driver for Invensense gyroscopes.
This driver currently works for the following devices\+: MPU6050 MPU6500 MPU9150 (or MPU6050 w/ AK8975 on the auxiliary bus) MPU9250 (or MPU6500 w/ AK8963 on the auxiliary bus)