hallcurrent 2.0.0.0
hallcurrent.h File Reference

This file contains API for Hall Current Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"

Go to the source code of this file.

Data Structures

struct  hallcurrent_t
 Click ctx object definition. More...
 
struct  hallcurrent_cfg_t
 Click configuration structure definition. More...
 

Macros

#define HALLCURRENT_MAP_MIKROBUS(cfg, mikrobus)
 
#define HALLCURRENT_OK   0
 
#define HALLCURRENT_ERROR   -1
 
#define HALLCURRENT_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define HALLCURRENT_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 

Functions

void hallcurrent_cfg_setup (hallcurrent_cfg_t *cfg)
 Config Object Initialization function.
 
err_t hallcurrent_init (hallcurrent_t *ctx, hallcurrent_cfg_t *cfg)
 Initialization function.
 
uint16_t hallcurrent_read_data (hallcurrent_t *ctx)
 Generic read 16-bit data function.
 
uint8_t hallcurrent_check_status (hallcurrent_t *ctx)
 Check status of read data function.
 
float hallcurrent_read_current (hallcurrent_t *ctx)
 Read electric current function.
 
uint8_t hallcurrent_get_ocd_pin (hallcurrent_t *ctx)
 Read OCD pin state function.
 

Detailed Description

This file contains API for Hall Current Click driver.