Library for use with VL53L0X, cut 1.1, based on mass-market API v1.1.

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Dependents:   ConcorsoFinal HelloWorld_IHM01A1 m3pi_BT m3pi_LIDAR ... more

Fork of X_NUCLEO_53L0A1 by ST Expansion SW Team

Embed: (wiki syntax)

« Back to documentation index

Stmpe1600 Class Reference

Stmpe1600 Class Reference

Class representing a whole stmpe1600 component (16 gpio) More...

#include <stmpe1600_class.h>

Public Member Functions

 Stmpe1600 (DevI2C &i2c, uint8_t dev_addr=STMPE1600_DEF_DEVICE_ADDRESS)
 Constructor.
void write_sys_ctrl (uint8_t data)
 Write the SYS_CTRL register.
bool set_gpio (ExpGpioPinName pin_name)
 Set the out pin.
bool clear_gpio (ExpGpioPinName pin_name)
 Clear the out pin.
bool read_gpio (ExpGpioPinName pin_name)
 Read the input pin.
bool set_gpio_dir (ExpGpioPinName pin_name, ExpGpioPinDirection pin_dir)
 Set the pin direction.
void read_16bit_reg (uint8_t reg16_addr, uint16_t *reg16_data)
 Read a 16 bits register.
void write_16bit_reg (uint8_t reg16_addr, uint16_t *reg16_data)
 Write a 16 bits register.

Detailed Description

Class representing a whole stmpe1600 component (16 gpio)

Definition at line 212 of file stmpe1600_class.h.


Constructor & Destructor Documentation

Stmpe1600 ( DevI2C &  i2c,
uint8_t  dev_addr = STMPE1600_DEF_DEVICE_ADDRESS 
)

Constructor.

Parameters:
[in]&i2cdevice I2C to be used for communication
[in]DevAddrthe stmpe1600 I2C device addres (deft STMPE1600_DEF_DEVICE_ADDRESS)

Definition at line 220 of file stmpe1600_class.h.


Member Function Documentation

bool clear_gpio ( ExpGpioPinName  pin_name )

Clear the out pin.

Parameters:
[in]Thepin name
Returns:
0 on Success

Definition at line 259 of file stmpe1600_class.h.

void read_16bit_reg ( uint8_t  reg16_addr,
uint16_t *  reg16_data 
)

Read a 16 bits register.

Parameters:
[in]Theregister address
[in]Thepointer to the read data

Definition at line 306 of file stmpe1600_class.h.

bool read_gpio ( ExpGpioPinName  pin_name )

Read the input pin.

Parameters:
[in]Thepin name
Returns:
The logical pin level

Definition at line 273 of file stmpe1600_class.h.

bool set_gpio ( ExpGpioPinName  pin_name )

Set the out pin.

Parameters:
[in]Thepin name
Returns:
0 on Success

Definition at line 245 of file stmpe1600_class.h.

bool set_gpio_dir ( ExpGpioPinName  pin_name,
ExpGpioPinDirection  pin_dir 
)

Set the pin direction.

Parameters:
[in]Thepin name
[in]Thepin direction
Returns:
0 on success

Definition at line 291 of file stmpe1600_class.h.

void write_16bit_reg ( uint8_t  reg16_addr,
uint16_t *  reg16_data 
)

Write a 16 bits register.

Parameters:
[in]Theregister address
[in]Thepointer to the data to be written

Definition at line 316 of file stmpe1600_class.h.

void write_sys_ctrl ( uint8_t  data )

Write the SYS_CTRL register.

Parameters:
[in]Datato be written (bit fields)

Definition at line 235 of file stmpe1600_class.h.