brushless30  2.1.0.0
Data Structures | Macros | Enumerations | Functions
brushless30.h File Reference

This file contains API for Brushless 30 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  brushless30_t
 Brushless 30 Click context object. More...
 
struct  brushless30_cfg_t
 Brushless 30 Click configuration object. More...
 

Macros

#define BRUSHLESS30_REG_OPSEL1   0x00
 Brushless 30 register list. More...
 
#define BRUSHLESS30_REG_OPSEL2   0x04
 
#define BRUSHLESS30_REG_STAT1   0x08
 
#define BRUSHLESS30_REG_STAT2   0x0C
 
#define BRUSHLESS30_REG_CP_RLY_CTRL   0x14
 
#define BRUSHLESS30_REG_PL_CTRL   0x18
 
#define BRUSHLESS30_REG_T_ILIM   0x1C
 
#define BRUSHLESS30_REG_FET_OPSEL   0x24
 
#define BRUSHLESS30_REG_HS_VDS_SEL   0x28
 
#define BRUSHLESS30_REG_LS_VDS_SEL   0x2C
 
#define BRUSHLESS30_REG_FET_DET_SEL   0x30
 
#define BRUSHLESS30_REG_AMP_CTRL   0x40
 
#define BRUSHLESS30_REG_AMP_STAT   0x44
 
#define BRUSHLESS30_REG_ALM_CTRL   0x48
 
#define BRUSHLESS30_REG_QA_CTRL   0x4C
 
#define BRUSHLESS30_REG_ANSWER   0x50
 
#define BRUSHLESS30_REG_BIST_DIAG   0x54
 
#define BRUSHLESS30_REG_BIST_STAT   0x58
 
#define BRUSHLESS30_REG_FET_TEST_CNT1   0x5C
 
#define BRUSHLESS30_REG_FET_TEST_CNT2   0x60
 
#define BRUSHLESS30_REG_FET_TEST_STAT   0x64
 
#define BRUSHLESS30_REG_VDS_COMP_STAT   0x68
 
#define BRUSHLESS30_REG_DUMMY   0x7C
 
#define BRUSHLESS30_HS_VDS_SEL   0x2444
 Brushless 30 default config setting. More...
 
#define BRUSHLESS30_LS_VDS_SEL   0x2444
 
#define BRUSHLESS30_AMP_CTRL   0x0333
 
#define BRUSHLESS30_CP_RLY_CTRL   0x1111
 
#define BRUSHLESS30_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection. More...
 
#define BRUSHLESS30_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define BRUSHLESS30_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  brushless30_return_value_t { BRUSHLESS30_OK = 0, BRUSHLESS30_ERROR = -1 }
 Brushless 30 Click return value data. More...
 

Functions

void brushless30_cfg_setup (brushless30_cfg_t *cfg)
 Brushless 30 configuration object setup function. More...
 
err_t brushless30_init (brushless30_t *ctx, brushless30_cfg_t *cfg)
 Brushless 30 initialization function. More...
 
err_t brushless30_default_cfg (brushless30_t *ctx)
 Brushless 30 default configuration function. More...
 
err_t brushless30_write_reg (brushless30_t *ctx, uint8_t reg, uint16_t data_in)
 Brushless 30 write reg function. More...
 
err_t brushless30_read_reg (brushless30_t *ctx, uint8_t reg, uint16_t *data_out)
 Brushless 30 read reg function. More...
 
void brushless30_enable_driver (brushless30_t *ctx)
 Brushless 30 enable driver function. More...
 
void brushless30_disable_driver (brushless30_t *ctx)
 Brushless 30 disable driver function. More...
 
uint8_t brushless30_get_diag_pin (brushless30_t *ctx)
 Brushless 30 get diag pin function. More...
 

Detailed Description

This file contains API for Brushless 30 Click Driver.

Enumeration Type Documentation

◆ brushless30_return_value_t

Brushless 30 Click return value data.

Predefined enum values for driver return values.

Enumerator
BRUSHLESS30_OK 
BRUSHLESS30_ERROR