oneshot 2.0.0.0
oneshot.h File Reference

This file contains API for One Shot Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  oneshot_t
 Click ctx object definition. More...
 
struct  oneshot_cfg_t
 Click configuration structure definition. More...
 

Macros

#define ONESHOT_MAP_MIKROBUS(cfg, mikrobus)
 
#define ONESHOT_RETVAL   uint8_t
 
#define ONESHOT_OK   0x00
 
#define ONESHOT_INIT_ERROR   0xFF
 
#define ONESHOT_SLAVE_ADDRESS   0x2C
 
#define ONESHOT_FULL_SCALE   0xFF
 
#define ONESHOT_MIDSCALE   0x80
 
#define ONESHOT_1_LSB   0x01
 
#define ONESHOT_ZERO_SCALE   0x00
 

Functions

void oneshot_cfg_setup (oneshot_cfg_t *cfg)
 Config Object Initialization function.
 
ONESHOT_RETVAL oneshot_init (oneshot_t *ctx, oneshot_cfg_t *cfg)
 Initialization function.
 
void oneshot_default_cfg (oneshot_t *ctx)
 Click Default Configuration function.
 
void oneshot_generic_write (oneshot_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void oneshot_generic_read (oneshot_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
float oneshot_get_resistance (oneshot_t *ctx)
 Get resistance function.
 
uint8_t oneshot_digital_read_rst (oneshot_t *ctx)
 Digital read reset function.
 
void oneshot_digital_write_cs (oneshot_t *ctx, uint8_t signal)
 Digital write chip select function.
 

Detailed Description

This file contains API for One Shot Click driver.