Workshop example

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Embed: (wiki syntax)

« Back to documentation index

Stmpe1600 Class Reference

Stmpe1600 Class Reference

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

#include <Stmpe1600.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 218 of file Stmpe1600.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 226 of file Stmpe1600.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 266 of file Stmpe1600.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 317 of file Stmpe1600.h.

bool read_gpio ( ExpGpioPinName  pin_name )

Read the input pin.

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

Definition at line 281 of file Stmpe1600.h.

bool set_gpio ( ExpGpioPinName  pin_name )

Set the out pin.

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

Definition at line 251 of file Stmpe1600.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 301 of file Stmpe1600.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 327 of file Stmpe1600.h.

void write_sys_ctrl ( uint8_t  data )

Write the SYS_CTRL register.

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

Definition at line 241 of file Stmpe1600.h.