39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define LIGHTRANGER7_CMD_START 's'
74#define LIGHTRANGER7_CMD_STOP 'p'
81#define LIGHTRANGER7_TX_DRV_BUFFER_SIZE 100
82#define LIGHTRANGER7_RX_DRV_BUFFER_SIZE 1000
100#define LIGHTRANGER7_MAP_MIKROBUS( cfg, mikrobus ) \
101 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
102 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
103 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX );
#define LIGHTRANGER7_TX_DRV_BUFFER_SIZE
LightRanger 7 driver buffer size.
Definition lightranger7.h:81
#define LIGHTRANGER7_RX_DRV_BUFFER_SIZE
Definition lightranger7.h:82
err_t lightranger7_init(lightranger7_t *ctx, lightranger7_cfg_t *cfg)
LightRanger 7 initialization function.
err_t lightranger7_start_measurement(lightranger7_t *ctx)
LightRanger 7 start measurement function.
void lightranger7_cfg_setup(lightranger7_cfg_t *cfg)
LightRanger 7 configuration object setup function.
err_t lightranger7_generic_write(lightranger7_t *ctx, uint8_t *data_in, uint16_t len)
LightRanger 7 data writing function.
void lightranger7_enable_device(lightranger7_t *ctx)
LightRanger 7 enable device function.
err_t lightranger7_stop_measurement(lightranger7_t *ctx)
LightRanger 7 stop measurement function.
err_t lightranger7_generic_read(lightranger7_t *ctx, uint8_t *data_out, uint16_t len)
LightRanger 7 data reading function.
void lightranger7_reset_device(lightranger7_t *ctx)
LightRanger 7 reset device function.
void lightranger7_disable_device(lightranger7_t *ctx)
LightRanger 7 disable device function.
lightranger7_return_value_t
LightRanger 7 Click return value data.
Definition lightranger7.h:151
@ LIGHTRANGER7_ERROR
Definition lightranger7.h:153
@ LIGHTRANGER7_OK
Definition lightranger7.h:152
LightRanger 7 Click configuration object.
Definition lightranger7.h:131
uint32_t baud_rate
Definition lightranger7.h:138
bool uart_blocking
Definition lightranger7.h:139
uart_data_bits_t data_bit
Definition lightranger7.h:140
pin_name_t tx_pin
Definition lightranger7.h:134
pin_name_t rx_pin
Definition lightranger7.h:133
uart_stop_bits_t stop_bit
Definition lightranger7.h:142
uart_parity_t parity_bit
Definition lightranger7.h:141
pin_name_t rst
Definition lightranger7.h:135
LightRanger 7 Click context object.
Definition lightranger7.h:113
uart_t uart
Definition lightranger7.h:118
digital_out_t rst
Definition lightranger7.h:115