dcmotor10 2.0.0.0
dcmotor10.h File Reference

This file contains API for DC Motor 10 Click driver. More...

#include "drv_digital_out.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  dcmotor10_t
 Click ctx object definition. More...
 
struct  dcmotor10_cfg_t
 Click configuration structure definition. More...
 

Macros

#define DCMOTOR10_MAP_MIKROBUS(cfg, mikrobus)
 
#define DCMOTOR10_RETVAL   uint8_t
 
#define DCMOTOR10_OK   0x00
 
#define DCMOTOR10_INIT_ERROR   0xFF
 
#define DCMOTOR10_STATUS_REG_RST   0x0001
 
#define DCMOTOR10_LS_SWITCH_1   0x0002
 
#define DCMOTOR10_HS_SWITCH_1   0x0004
 
#define DCMOTOR10_LS_SWITCH_2   0x0008
 
#define DCMOTOR10_HS_SWITCH_2   0x0010
 
#define DCMOTOR10_LS_SWITCH_3   0x0020
 
#define DCMOTOR10_HS_SWITCH_3   0x0040
 
#define DCMOTOR10_LS_SWITCH_4   0x0080
 
#define DCMOTOR10_HS_SWITCH_4   0x0100
 
#define DCMOTOR10_LS_SWITCH_5   0x0200
 
#define DCMOTOR10_HS_SWITCH_5   0x0400
 
#define DCMOTOR10_LS_SWITCH_6   0x0800
 
#define DCMOTOR10_HS_SWITCH_6   0x1000
 
#define DCMOTOR10_OVERCURRENT_SHUT_DOWN   0x2000
 
#define DCMOTOR10_UNDERLOAD_SHUT_DOWN   0x4000
 
#define DCMOTOR10_OVER_VOLT_LOCKOUT   0x8000
 
#define DCMOTOR10_TEMP_PREWARNING   0x0001
 
#define DCMOTOR10_STATUS_LS_SWITCH_1   0x0002
 
#define DCMOTOR10_STATUS_HS_SWITCH_1   0x0004
 
#define DCMOTOR10_STATUS_LS_SWITCH_2   0x0008
 
#define DCMOTOR10_STATUS_HS_SWITCH_2   0x0010
 
#define DCMOTOR10_STATUS_LS_SWITCH_3   0x0020
 
#define DCMOTOR10_STATUS_HS_SWITCH_3   0x0040
 
#define DCMOTOR10_STATUS_LS_SWITCH_4   0x0080
 
#define DCMOTOR10_STATUS_HS_SWITCH_4   0x0100
 
#define DCMOTOR10_STATUS_LS_SWITCH_5   0x0200
 
#define DCMOTOR10_STATUS_HS_SWITCH_5   0x0400
 
#define DCMOTOR10_STATUS_LS_SWITCH_6   0x0800
 
#define DCMOTOR10_STATUS_HS_SWITCH_6   0x1000
 
#define DCMOTOR10_OVERLOAD   0x2000
 
#define DCMOTOR10_UNDERLOAD   0x4000
 
#define DCMOTOR10_POWER_SUPPLY_FAIL   0x8000
 
#define DCMOTOR10_OVERCURRENT_FAULT   0x2000
 
#define DCMOTOR10_GND_SHORT_CIRCUIT   0x2000
 
#define DCMOTOR10_VS_SHORT_CIRCUIT   0x2000
 
#define DCMOTOR10_TEMP_WARNING   0x0001
 
#define DCMOTOR10_OPENLOAD_FAULT   0x4000
 
#define DCMOTOR10_UNDERLOAD_FAULT   0x4000
 
#define DCMOTOR10_UNDER_VOLT_LOCKOUT_FAULT   0x8000
 
#define DCMOTOR10_OVER_VOLT_LOCKOUT_FAULT   0x8000
 
#define DCMOTOR10_RESET_STATUS_REG   0x0001
 
#define DCMOTOR10_ENABLE_1   0x000E
 
#define DCMOTOR10_ENABLE_2   0x0038
 
#define DCMOTOR10_ENABLE_3   0x00E0
 
#define DCMOTOR10_ENABLE_4   0x0380
 
#define DCMOTOR10_ENABLE_5   0x0E00
 
#define DCMOTOR10_ENABLE_6   0x3800
 
#define DCMOTOR10_ENABLE_ALL   0x1FFE
 
#define DCMOTOR10_HB_ENABLE_1_CV   0x000C
 
#define DCMOTOR10_HB_ENABLE_1_CCV   0x0012
 
#define DCMOTOR10_HB_ENABLE_2_CV   0x0030
 
#define DCMOTOR10_HB_ENABLE_2_CCV   0x0048
 
#define DCMOTOR10_HB_ENABLE_3_CV   0x00C0
 
#define DCMOTOR10_HB_ENABLE_3_CCV   0x0120
 
#define DCMOTOR10_HB_ENABLE_4_CV   0x0300
 
#define DCMOTOR10_HB_ENABLE_4_CCV   0x0480
 
#define DCMOTOR10_HB_ENABLE_5_CV   0x0C00
 
#define DCMOTOR10_HB_ENABLE_5_CCV   0x1200
 
#define DCMOTOR10_8_BIT_DATA   0xFF
 
#define DCMOTOR10_INHIBIT   0x00
 
#define DCMOTOR10_UNINHIBIT   0x01
 

Functions

void dcmotor10_cfg_setup (dcmotor10_cfg_t *cfg)
 Config Object Initialization function.
 
DCMOTOR10_RETVAL dcmotor10_init (dcmotor10_t *ctx, dcmotor10_cfg_t *cfg)
 Initialization function.
 
void dcmotor10_send_cmd (dcmotor10_t *ctx, uint16_t wr_data)
 Send command function.
 
uint16_t dcmotor10_read_status (dcmotor10_t *ctx)
 Read status function.
 
void dcmotor10_inhibit (dcmotor10_t *ctx, uint8_t state)
 Inhibit device function.
 

Detailed Description

This file contains API for DC Motor 10 Click driver.