|
Contiki 3.x
|
Files | |
| file | sensor-common.c |
| Utilities common among SensorTag sensors. | |
| file | sensor-common.h |
| Header file for the Sensortag-CC26xx Common sensor utilities. | |
Functions | |
| bool | sensor_common_read_reg (uint8_t addr, uint8_t *buf, uint8_t len) |
| Reads a sensor's register over I2C. More... | |
| bool | sensor_common_write_reg (uint8_t addr, uint8_t *buf, uint8_t len) |
| Write to a sensor's register over I2C. More... | |
| void | sensor_common_set_error_data (uint8_t *buf, uint8_t len) |
| Fill a result buffer with dummy error data. More... | |
| bool sensor_common_read_reg | ( | uint8_t | addr, |
| uint8_t * | buf, | ||
| uint8_t | len | ||
| ) |
Reads a sensor's register over I2C.
| addr | The address of the register to read |
| buf | Pointer to buffer to place data |
| len | Number of bytes to read |
The sensor must be selected before this routine is called.
Definition at line 48 of file sensor-common.c.
References board_i2c_write_read().
Referenced by acc_read(), gyro_read(), init(), int_status(), read_data(), and sensor_wakeup().
| void sensor_common_set_error_data | ( | uint8_t * | buf, |
| uint8_t | len | ||
| ) |
Fill a result buffer with dummy error data.
| buf | Pointer to the buffer where to write the data |
| len | Number of bytes to fill |
Definition at line 71 of file sensor-common.c.
Referenced by acc_read(), gyro_read(), and read_data().
| bool sensor_common_write_reg | ( | uint8_t | addr, |
| uint8_t * | buf, | ||
| uint8_t | len | ||
| ) |
Write to a sensor's register over I2C.
| addr | The address of the register to read |
| buf | Pointer to buffer containing data to be written |
| len | Number of bytes to write |
The sensor must be selected before this routine is called.
Definition at line 54 of file sensor-common.c.
References addr, and board_i2c_write().
Referenced by acc_set_range(), enable_sensor(), init(), select_axes(), sensor_init(), sensor_sleep(), and sensor_wakeup().
1.8.6