Librairie adaptée au laboratoire 2

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_6180XA1 by ST

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 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]&i2cdevice I2C to be used for communication
[in]DevAddrthe 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]Thepin 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]Thepin 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]Theregister address
[in]Thepointer 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]Thepin 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]Thepin name
[in]Thepin 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]Theregister address
[in]Thepointer 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]Datato be written (bit fields)

Definition at line 234 of file STMPE1600.h.