|
Rleg
2
|
|
Functions | |
| int | gyr_write_reg (int i2c_dev, uint8_t reg, uint8_t data) |
| WRITE TO REGISTER. More... | |
| uint8_t * | gyr_read_reg (int i2c_dev, uint8_t reg, uint8_t count) |
| READ COUNT 8-BIT REGISTER IN SEQUENCE. More... | |
| int | gyr_init (int i2c_dev, float rate, short int lpf_bw, char clk_source, char *act) |
| INITIALIZE GYROMETER. More... | |
| int | gyr_read_all_data (int i2c_dev, short int *data) |
| READ ALL DATA AT ONCE (X, Y, Z and T) More... | |
| short int | gyr_read_data (int i2c_dev, int type) |
| READ DATA (X, Y, Z or T) More... | |
| int gyr_init | ( | int | i2c_dev, |
| float | rate, | ||
| short int | lpf_bw, | ||
| char | clk_source, | ||
| char * | act | ||
| ) |
INITIALIZE GYROMETER.
| lpf_bw | (low pass filter bandwidth in Hz) = 256, 188, 98, 42, 20, 10 or 5 |
| rate | (output data rate in Hz) <= 1000 (Fint), if lpf_bw is not 256 <= 8000 (Fint), if lpf_bw is 256 Real rate will be the closest superior rate possible, respcting the formula Rate = Fint/n, 1<=n<=255 |
| clk_source | = 'I' Internal oscillator 'X' PLL with X Gyro reference 'Y' PLL with Y Gyro reference 'Z' Pll with Z Gyro reference Obs: It is highly recommended that the device is configured to use one of the gyros as the clock reference, due to the improved stability |
| act | (activated gyro data) = "XYZ" All axes are activated "YZ" Only Y and Z axes are activated "XZ" Only X and Z axes are activated "XY" Only X and Y axes are activated "X" Only X axis is activated "Y" Only Y axis is activated "Z" Only Z axis is activated "" Device in very low power sleep mode |
Definition at line 53 of file gyr_functions.c.
References GYR_DLPF_FS, GYR_PWR_MGM, GYR_SMPLRT_DIV, and gyr_write_reg().
Referenced by devices_init().


| int gyr_read_all_data | ( | int | i2c_dev, |
| short int * | data | ||
| ) |
READ ALL DATA AT ONCE (X, Y, Z and T)
| i2c_dev | ||
| [out] | *data | Vector with all data |
Definition at line 149 of file gyr_functions.c.
References FAILURE, gyr_read_reg(), GYR_TEMP_OUT_H, and SUCCESS.
Referenced by read_all_data().


| short int gyr_read_data | ( | int | i2c_dev, |
| int | type | ||
| ) |
READ DATA (X, Y, Z or T)
| i2c_dev | |
| type | Define kind of read: 'X' or 'Y' or 'Z' or 'T'(temperature) |
Definition at line 177 of file gyr_functions.c.
References GYR_GYRO_XOUT_H, GYR_GYRO_YOUT_H, GYR_GYRO_ZOUT_H, gyr_read_reg(), and GYR_TEMP_OUT_H.

| uint8_t* gyr_read_reg | ( | int | i2c_dev, |
| uint8_t | reg, | ||
| uint8_t | count | ||
| ) |
READ COUNT 8-BIT REGISTER IN SEQUENCE.
| reg | Register |
| count | number of registers in sequence |
Definition at line 31 of file gyr_functions.c.
Referenced by gyr_read_all_data(), and gyr_read_data().

| int gyr_write_reg | ( | int | i2c_dev, |
| uint8_t | reg, | ||
| uint8_t | data | ||
| ) |
WRITE TO REGISTER.
| i2c_dev | |
| reg | Register |
| data | Data to write in Register |
Implements the I2C communication between Gumstix Overo Fire and ITG3200
Definition at line 10 of file gyr_functions.c.
References FAILURE, GYR_INT_CFG, GYR_PWR_MGM, GYR_SMPLRT_DIV, GYR_WHO_AM_I, and SUCCESS.
Referenced by gyr_init().

1.8.6