amiro-lld / drivers / VL53L1X / v1 / alld_VL53L1X.h @ 4dba9195
History | View | Annotate | Download (2.57 KB)
| 1 |
/**
|
|---|---|
| 2 |
* @file alld_VL53L1X.h
|
| 3 |
* @brief Touch sensor macros and structures.
|
| 4 |
*
|
| 5 |
* @addtogroup lld_touch
|
| 6 |
* @{
|
| 7 |
*/
|
| 8 |
|
| 9 |
#ifndef AMIROLLD_VL53L1X_H
|
| 10 |
#define AMIROLLD_VL53L1X_H
|
| 11 |
|
| 12 |
#include <amiro-lld.h> |
| 13 |
#include <alld_VL53L1X_types.h> |
| 14 |
#include <vl53l1_api.h> |
| 15 |
/******************************************************************************/
|
| 16 |
/* CONSTANTS */
|
| 17 |
/******************************************************************************/
|
| 18 |
// 400kHz
|
| 19 |
#define VL53L1X_LLD_I2C_MAXFREQUENCY 400000 |
| 20 |
|
| 21 |
/* Default I2C address */
|
| 22 |
/* #define VL53L1X_LLD_I2C_ADDR_DEFAULT 0x52 */
|
| 23 |
#define VL53L1X_LLD_I2C_ADDR_DEFAULT 0x29 |
| 24 |
|
| 25 |
#define VL53L1X_LLD_BOOTDURATION 1200 |
| 26 |
|
| 27 |
/******************************************************************************/
|
| 28 |
/* SETTINGS */
|
| 29 |
/******************************************************************************/
|
| 30 |
|
| 31 |
/******************************************************************************/
|
| 32 |
/* CHECKS */
|
| 33 |
/******************************************************************************/
|
| 34 |
|
| 35 |
/******************************************************************************/
|
| 36 |
/* DATA STRUCTURES AND TYPES */
|
| 37 |
/******************************************************************************/
|
| 38 |
|
| 39 |
/**
|
| 40 |
* @brief The state of the GPIOs.
|
| 41 |
*/
|
| 42 |
typedef enum { |
| 43 |
GPIO_LLD_STATE_OFF = 0x00, /**< 'on' state of the LED */ |
| 44 |
GPIO_LLD_STATE_ON = 0x01, /**< 'off' state of the LED */ |
| 45 |
} gpio_lld_state_t; |
| 46 |
|
| 47 |
/******************************************************************************/
|
| 48 |
/* MACROS */
|
| 49 |
/******************************************************************************/
|
| 50 |
|
| 51 |
/******************************************************************************/
|
| 52 |
/* EXTERN DECLARATIONS */
|
| 53 |
/******************************************************************************/
|
| 54 |
|
| 55 |
#ifdef __cplusplus
|
| 56 |
extern "C" { |
| 57 |
#endif
|
| 58 |
apalExitStatus_t hello_world(void);
|
| 59 |
apalExitStatus_t vl53l1x_GPIO1_set(const VL53L1XDriver* const vlx, const gpio_lld_state_t state); |
| 60 |
|
| 61 |
#ifdef __cplusplus
|
| 62 |
} |
| 63 |
#endif
|
| 64 |
|
| 65 |
|
| 66 |
/******************************************************************************/
|
| 67 |
/* INLINE FUNCTIONS */
|
| 68 |
/******************************************************************************/
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
#endif /* AMIROLLD_VL53L1X_H */ |