Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: VL6180_Board
Misc functions
[API Low Level Functions]
Misc functions. More...
Functions | |
| VL6180_API int | VL6180_SetGroupParamHold (VL6180Dev_t dev, int Hold) |
| Set Group parameter Hold state. | |
| VL6180_API int | VL6180_SetI2CAddress (VL6180Dev_t dev, uint8_t NewAddr) |
| Set new device i2c address. | |
| VL6180_API int | VL6180_SetupGPIOx (VL6180Dev_t dev, int pin, uint8_t IntFunction, int ActiveHigh) |
| Fully configure gpio 0/1 pin : polarity and functionality. | |
| VL6180_API int | VL6180_SetGPIOxPolarity (VL6180Dev_t dev, int pin, int active_high) |
| Set interrupt pin polarity for the given GPIO. | |
| VL6180_API int | VL6180_SetGPIOxFunctionality (VL6180Dev_t dev, int pin, uint8_t functionality) |
| Select interrupt functionality for the given GPIO. | |
| VL6180_API int | VL6180_DisableGPIOxOut (VL6180Dev_t dev, int pin) |
| Disable and turn to Hi-Z gpio output pin. | |
Detailed Description
Misc functions.
Function Documentation
| VL6180_API int VL6180_DisableGPIOxOut | ( | VL6180Dev_t | dev, |
| int | pin | ||
| ) |
Disable and turn to Hi-Z gpio output pin.
- Parameters:
-
dev The device pin The pin number to disable 0 or 1
- Returns:
- 0 on success
Definition at line 1132 of file vl6180_api.c.
| VL6180_API int VL6180_SetGPIOxFunctionality | ( | VL6180Dev_t | dev, |
| int | pin, | ||
| uint8_t | functionality | ||
| ) |
Select interrupt functionality for the given GPIO.
- Function Description
- Functionality refer to SYSTEM_MODE_GPIO0
- Parameters:
-
dev The device pin Pin to configure 0 or 1 (gpio0 or gpio1)Note that gpio0 is chip enable at power up ! functionality Pin 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 1070 of file vl6180_api.c.
| VL6180_API int VL6180_SetGPIOxPolarity | ( | VL6180Dev_t | dev, |
| int | pin, | ||
| int | active_high | ||
| ) |
Set interrupt pin polarity for the given GPIO.
- Parameters:
-
dev The device pin Pin 0 or 1 active_high select active high or low polarity using IntrPol_e
- Returns:
- 0 on success
Definition at line 1041 of file vl6180_api.c.
| VL6180_API int VL6180_SetGroupParamHold | ( | VL6180Dev_t | dev, |
| int | Hold | ||
| ) |
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
- Parameters:
-
dev The device Hold Group parameter Hold state to be set (on/off)
- Returns:
- 0 on success
Definition at line 363 of file vl6180_api.c.
| VL6180_API int VL6180_SetI2CAddress | ( | VL6180Dev_t | dev, |
| uint8_t | NewAddr | ||
| ) |
Set new device i2c address.
After completion the device will answer to the new address programmed.
- See also:
- AN4478: Using multiple VL6180's in a single design
- Parameters:
-
dev The device NewAddr The new i2c address (8 bits)
- Returns:
- 0 on success
Definition at line 298 of file vl6180_api.c.
| VL6180_API int VL6180_SetupGPIOx | ( | VL6180Dev_t | dev, |
| int | pin, | ||
| uint8_t | IntFunction, | ||
| int | ActiveHigh | ||
| ) |
Fully configure gpio 0/1 pin : polarity and functionality.
- Parameters:
-
dev The device pin gpio pin 0 or 1 IntFunction Pin functionality : either GPIOx_SELECT_OFF or GPIOx_SELECT_GPIO_INTERRUPT_OUTPUT (refer to SYSTEM_MODE_GPIO1 register definition) ActiveHigh Set active high polarity, or active low see IntrPol_e
- Returns:
- 0 on success
Definition at line 1099 of file vl6180_api.c.
Generated on Tue Nov 29 2022 20:47:36 by
1.7.2