Library to handle the X-NUCLEO-6180XA1 Proximity and ambient light sensor expansion board based on VL6180X.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: HelloWorld_6180XA1 SunTracker_BLE Servo_6180XA1 BLE_HR_Light ... more
Fork of X_NUCLEO_6180XA1 by
STMPE1600 Class Reference
Class representing a whole stmpe1600 component (16 gpio) More...
#include <STMPE1600.h>
Public Member Functions | |
| STMPE1600 (DevI2C &i2c, uint8_t DevAddr=STMPE1600_DEF_DEVICE_ADDRESS) | |
| Constructor. | |
| void | write_sys_ctrl (uint8_t data) |
| Write the SYS_CTRL register. | |
| bool | set_gpio (exp_gpio_pin_name pin_name) |
| Set the out pin. | |
| bool | clr_gpio (exp_gpio_pin_name pin_name) |
| Clear the out pin. | |
| bool | rd_gpio (exp_gpio_pin_name pin_name) |
| Read the input pin. | |
| bool | set_gpio_dir (exp_gpio_pin_name pin_name, exp_gpio_pin_direction pin_dir) |
| Set the pin direction. | |
| void | read_16_bit_reg (uint8_t reg_16_addr, uint16_t *reg_16_data) |
| Read a 16 bits register. | |
| void | write_16_bit_reg (uint8_t reg_16_addr, uint16_t *reg_16_data) |
| Write a 16 bits register. | |
Detailed Description
Class representing a whole stmpe1600 component (16 gpio)
Definition at line 212 of file STMPE1600.h.
Constructor & Destructor Documentation
| STMPE1600 | ( | DevI2C & | i2c, |
| uint8_t | DevAddr = STMPE1600_DEF_DEVICE_ADDRESS |
||
| ) |
Constructor.
- Parameters:
-
[in] &i2c device I2C to be used for communication [in] DevAddr the stmpe1600 I2C device addres (deft STMPE1600_DEF_DEVICE_ADDRESS)
Definition at line 218 of file STMPE1600.h.
Member Function Documentation
| bool clr_gpio | ( | exp_gpio_pin_name | pin_name ) |
Clear the out pin.
- Parameters:
-
[in] The pin name
- Returns:
- 0 on Success
Definition at line 257 of file STMPE1600.h.
| bool rd_gpio | ( | exp_gpio_pin_name | pin_name ) |
Read the input pin.
- Parameters:
-
[in] The pin name
- Returns:
- The logical pin level
Definition at line 270 of file STMPE1600.h.
| void read_16_bit_reg | ( | uint8_t | reg_16_addr, |
| uint16_t * | reg_16_data | ||
| ) |
Read a 16 bits register.
- Parameters:
-
[in] The register address [in] The pointer to the read data
Definition at line 304 of file STMPE1600.h.
| bool set_gpio | ( | exp_gpio_pin_name | pin_name ) |
Set the out pin.
- Parameters:
-
[in] The pin name
- Returns:
- 0 on Success
Definition at line 244 of file STMPE1600.h.
| bool set_gpio_dir | ( | exp_gpio_pin_name | pin_name, |
| exp_gpio_pin_direction | pin_dir | ||
| ) |
Set the pin direction.
- Parameters:
-
[in] The pin name [in] The pin direction
- Returns:
- 0 on success
Definition at line 288 of file STMPE1600.h.
| void write_16_bit_reg | ( | uint8_t | reg_16_addr, |
| uint16_t * | reg_16_data | ||
| ) |
Write a 16 bits register.
- Parameters:
-
[in] The register address [in] The pointer to the data to be written
Definition at line 314 of file STMPE1600.h.
| void write_sys_ctrl | ( | uint8_t | data ) |
Write the SYS_CTRL register.
- Parameters:
-
[in] Data to be written (bit fields)
Definition at line 234 of file STMPE1600.h.
Generated on Wed Jul 13 2022 23:03:14 by
1.7.2

X-NUCLEO-6180XA1 Proximity and Ambient Light Sensor