Code petit robot

Dependencies:   X_NUCLEO_COMMON X_NUCLEO_IHM01A1 mbed

Embed: (wiki syntax)

« Back to documentation index

Misc functions

Misc functions
[ALS functions]

Misc functions. More...

Functions

int SetGroupParamHold (int Hold)
 Set Group parameter Hold state.
int SetI2CAddress (int NewAddr)
 Set new device i2c address.
int SetupGPIOx (int pin, uint8_t IntFunction, int ActiveHigh)
 Fully configure gpio 0/1 pin : polarity and functionality.
int SetGPIOxPolarity (int pin, int active_high)
 Set interrupt pin polarity for the given GPIO.
int SetGPIOxFunctionality (int pin, uint8_t functionality)
 Select interrupt functionality for the given GPIO.
int DisableGPIOxOut (int pin)
 brief Disable and turn to Hi-Z gpio output pin

Detailed Description

Misc functions.


Function Documentation

int DisableGPIOxOut ( int  pin ) [inherited]

brief Disable and turn to Hi-Z gpio output pin

Parameters:
pinThe pin number to disable 0 or 1
Returns:
0 on success

Definition at line 948 of file vl6180x_class.h.

int SetGPIOxFunctionality ( int  pin,
uint8_t  functionality 
) [inherited]

Select interrupt functionality for the given GPIO.

Function Description
Functionality refer to SYSTEM_MODE_GPIO0
Parameters:
pinPin to configure 0 or 1 (gpio0 or gpio1) that gpio0 is chip enable at power up !
functionalityPin functionality : either GPIOx_SELECT_OFF or GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT (refer to SYSTEM_MODE_GPIO1 register definition)
Returns:
0 on success

Definition at line 937 of file vl6180x_class.h.

int SetGPIOxPolarity ( int  pin,
int  active_high 
) [inherited]

Set interrupt pin polarity for the given GPIO.

Parameters:
pinPin 0 or 1
active_highselect active high or low polarity using IntrPol_e
Returns:
0 on success

Definition at line 922 of file vl6180x_class.h.

int SetGroupParamHold ( int  Hold ) [inherited]

Set Group parameter Hold state.

Function Description
Group parameter holds SYSTEM_GROUPED_PARAMETER_HOLD enable safe update (non atomic across multiple measure) by host
The critical register group is composed of:
SYSTEM_INTERRUPT_CONFIG_GPIO
SYSRANGE_THRESH_HIGH
SYSRANGE_THRESH_LOW
SYSALS_INTEGRATION_PERIOD
SYSALS_ANALOGUE_GAIN
SYSALS_THRESH_HIGH
SYSALS_THRESH_LOW
Parameters:
HoldGroup parameter Hold state to be set (on/off)
Returns:
0 on success

Definition at line 878 of file vl6180x_class.h.

int SetI2CAddress ( int  NewAddr ) [inherited]

Set new device i2c address.

After completion the device will answer to the new address programmed.

See also:
AN4478: Using multiple VL6180X's in a single design
Parameters:
NewAddrThe new i2c address (7bit)
Returns:
0 on success

Definition at line 892 of file vl6180x_class.h.

int SetupGPIOx ( int  pin,
uint8_t  IntFunction,
int  ActiveHigh 
) [inherited]

Fully configure gpio 0/1 pin : polarity and functionality.

Parameters:
pingpio pin 0 or 1
IntFunctionPin functionality : either GPIOx_SELECT_OFF or GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT (refer to SYSTEM_MODE_GPIO1 register definition)
ActiveHighSet active high polarity, or active low see IntrPol_e
Returns:
0 on success

Definition at line 910 of file vl6180x_class.h.