compass2 2.0.0.0
|
This file contains API for Compass 2 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | compass2_s |
Click ctx object definition. More... | |
struct | compass2_cfg_t |
Click configuration structure definition. More... | |
Typedefs | |
typedef uint8_t | compass2_select_t |
Communication type. | |
typedef void(* | compass2_master_io_t) (struct compass2_s *, uint8_t, uint8_t *, uint8_t) |
Master Input/Output type. | |
typedef struct compass2_s | compass2_t |
Click ctx object definition. | |
Functions | |
void | compass2_cfg_setup (compass2_cfg_t *cfg) |
Config Object Initialization function. | |
COMPASS2_RETVAL | compass2_init (compass2_t *ctx, compass2_cfg_t *cfg) |
Initialization function. | |
void | compass2_default_cfg (compass2_t *ctx) |
Click Default Configuration function. | |
void | compass2_generic_write (compass2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | compass2_generic_read (compass2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | compass2_write_byte (compass2_t *ctx, uint8_t reg, uint8_t data_buf) |
Write byte function. | |
uint8_t | compass2_read_byte (compass2_t *ctx, uint8_t reg) |
Read byte function. | |
void | compass2_reset (compass2_t *ctx) |
Hardware reset function. | |
void | compass2_i2c_disable (compass2_t *ctx) |
Switch from I2C to SPI mode function. | |
void | compass2_software_reset (compass2_t *ctx) |
Software reset function. | |
float | compass2_get_resolution_parameter (uint8_t res) |
Get resolution function. | |
uint8_t | compass2_get_rdy (compass2_t *ctx) |
Get ready function. | |
uint8_t | compass2_get_data_overrun (compass2_t *ctx) |
Get data overrun function. | |
void | compass2_get_adjustment (compass2_t *ctx, uint8_t *x, uint8_t *y, uint8_t *z) |
Get axis adjustment function. | |
void | compass2_set_out_resolution (compass2_t *ctx, uint8_t res) |
Set output resolution function. | |
void | compass2_set_mode (compass2_t *ctx, uint8_t mode) |
Set output resolution function. | |
void | compass2_get_all_data (compass2_t *ctx, int16_t *x, int16_t *y, int16_t *z) |
Get all data function. | |
int16_t | compass2_get_axis_data (compass2_t *ctx, uint8_t axis) |
Get one axis data function. | |
void | compass2_new_measurement (compass2_t *ctx) |
New measurement function. | |
This file contains API for Compass 2 Click driver.