hallswitch2 2.0.0.0
hallswitch2.h File Reference

This file contains API for Hall Switch 2 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  hallswitch2_t
 Hall Switch 2 Click context object. More...
 
struct  hallswitch2_cfg_t
 Hall Switch 2 Click configuration object. More...
 

Macros

#define HALLSWITCH2_NO_MAGNET_DETECTED   0
 Hall Switch 2 switch state values.
 
#define HALLSWITCH2_S_POLE_DETECTED   1
 
#define HALLSWITCH2_N_POLE_DETECTED   2
 
#define HALLSWITCH2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  hallswitch2_return_value_t { HALLSWITCH2_OK = 0 , HALLSWITCH2_ERROR = -1 }
 Hall Switch 2 Click return value data. More...
 

Functions

void hallswitch2_cfg_setup (hallswitch2_cfg_t *cfg)
 Hall Switch 2 configuration object setup function.
 
err_t hallswitch2_init (hallswitch2_t *ctx, hallswitch2_cfg_t *cfg)
 Hall Switch 2 initialization function.
 
uint8_t hallswitch2_check_state (hallswitch2_t *ctx)
 Hall Switch 2 check state function.
 

Detailed Description

This file contains API for Hall Switch 2 Click Driver.

Enumeration Type Documentation

◆ hallswitch2_return_value_t

Hall Switch 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
HALLSWITCH2_OK 
HALLSWITCH2_ERROR