Fabio Brembilla / X_NUCLEO_6180XA1

Dependencies:   X_NUCLEO_COMMON

Fork of X_NUCLEO_6180XA1 by ST

Embed: (wiki syntax)

« Back to documentation index

X_NUCLEO_6180XA1 Class Reference

X_NUCLEO_6180XA1 Class Reference

Class representing the X-NUCLEO-VL6180XA1 expansion board. More...

#include <x_nucleo_6180xa1.h>

Public Member Functions

 X_NUCLEO_6180XA1 (DevI2C *ext_i2c)
 Constructor 1.
 X_NUCLEO_6180XA1 (DevI2C *ext_i2c, PinName gpio1_top, PinName gpio1_bottom, PinName gpio1_left, PinName gpio1_right)
 Constructor 2.
 ~X_NUCLEO_6180XA1 ()
 Destructor.
int InitBoard ()
 Initialize the board and sensors with deft values.
bool RdSwitch ()
 Read the on board red slider switch.

Static Public Member Functions

static X_NUCLEO_6180XA1Instance (DevI2C *ext_i2c)
 Creates a singleton object instance.
static X_NUCLEO_6180XA1Instance (DevI2C *ext_i2c, PinName gpio1_top, PinName gpio1_bottom, PinName gpio1_left, PinName gpio1_right)
 Creates a singleton object instance.

Detailed Description

Class representing the X-NUCLEO-VL6180XA1 expansion board.

Definition at line 62 of file x_nucleo_6180xa1.h.


Constructor & Destructor Documentation

X_NUCLEO_6180XA1 ( DevI2C *  ext_i2c )

Constructor 1.

Parameters:
[in]&i2cdevice I2C to be used for communication

Definition at line 68 of file x_nucleo_6180xa1.h.

X_NUCLEO_6180XA1 ( DevI2C *  ext_i2c,
PinName  gpio1_top,
PinName  gpio1_bottom,
PinName  gpio1_left,
PinName  gpio1_right 
)

Constructor 2.

Parameters:
[in]&i2cdevice I2C to be used for communication
[in]PinNamegpio1_top Mbed DigitalOut pin name to be used as a top sensor GPIO_1 INT
[in]PinNamegpio1_bottom Mbed DigitalOut pin name to be used as a bottom sensor GPIO_1 INT
[in]PinNamegpio1_left Mbed DigitalOut pin name to be used as a left sensor GPIO_1 INT
[in]PinNamegpio1_right Mbed DigitalOut pin name to be used as a right sensor GPIO_1 INT

Definition at line 95 of file x_nucleo_6180xa1.h.

Destructor.

Definition at line 117 of file x_nucleo_6180xa1.h.


Member Function Documentation

int InitBoard (  )

Initialize the board and sensors with deft values.

Returns:
0 on success

Definition at line 67 of file x_nucleo_6180xa1.cpp.

X_NUCLEO_6180XA1 * Instance ( DevI2C *  ext_i2c,
PinName  gpio1_top,
PinName  gpio1_bottom,
PinName  gpio1_left,
PinName  gpio1_right 
) [static]

Creates a singleton object instance.

Parameters:
[in]&i2cdevice I2C to be used for communication
[in]PinNamegpio1_top the pin connected to top sensor INT
[in]PinNamegpio1_bottem the pin connected to bottom sensor INT
[in]PinNamegpio1_left the pin connected to left sensor INT
[in]PinNamegpio1_right the pin connected to right sensor INT
Returns:
Pointer to the object instance

Definition at line 54 of file x_nucleo_6180xa1.cpp.

X_NUCLEO_6180XA1 * Instance ( DevI2C *  ext_i2c ) [static]

Creates a singleton object instance.

Parameters:
[in]&i2cdevice I2C to be used for communication
Returns:
Pointer to the object instance

Definition at line 45 of file x_nucleo_6180xa1.cpp.

bool RdSwitch (  )

Read the on board red slider switch.

Returns:
0 or 1 according to switch position

Definition at line 197 of file x_nucleo_6180xa1.h.