hbridge3 2.0.0.0
|
This file contains API for H Bridge 3 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_pwm.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | hbridge3_t |
Click ctx object definition. More... | |
struct | hbridge3_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | HBRIDGE3_MAP_MIKROBUS(cfg, mikrobus) |
#define | HBRIDGE3_RETVAL uint8_t |
#define | HBRIDGE3_OK 0x00 |
#define | HBRIDGE3_INIT_ERROR 0xFF |
#define | HBRIDGE3_DEF_FREQ 20000 |
#define | HBRIDGE3_CMD_RD_DIA 0x00 |
#define | HBRIDGE3_CMD_RES_DIA 0x80 |
#define | HBRIDGE3_CMD_RD_REV 0x20 |
#define | HBRIDGE3_CMD_RD_CTRL 0x60 |
#define | HBRIDGE3_CMD_WR_CTRL 0xE0 |
#define | HBRIDGE3_CMD_WR_CTRL_RD_DIA 0xC0 |
#define | HBRIDGE3_CTRL_VIA_PWM_DIR 0x00 |
#define | HBRIDGE3_CTRL_VIA_SPI 0x80 |
#define | HBRIDGE3_SPI_ENA_OUT 0x40 |
#define | HBRIDGE3_SPI_DIS_OUT 0x00 |
#define | HBRIDGE3_SPI_DIR_1 0x00 |
#define | HBRIDGE3_SPI_DIR_2 0x20 |
#define | HBRIDGE3_SPI_PWM_0 0x00 |
#define | HBRIDGE3_SPI_PWM_1 0x01 |
Functions | |
void | hbridge3_cfg_setup (hbridge3_cfg_t *cfg) |
Config Object Initialization function. | |
HBRIDGE3_RETVAL | hbridge3_init (hbridge3_t *ctx, hbridge3_cfg_t *cfg) |
Initialization function. | |
void | hbridge3_default_cfg (hbridge3_t *ctx, float duty_cycle) |
Click Default Configuration function. | |
void | hbridge3_set_duty_cycle (hbridge3_t *ctx, float duty_cycle) |
Generic sets PWM duty cycle. | |
void | hbridge3_pwm_stop (hbridge3_t *ctx) |
Stop PWM module. | |
void | hbridge3_pwm_start (hbridge3_t *ctx) |
Start PWM module. | |
void | hbridge3_dir_set (hbridge3_t *ctx, uint8_t pin_state) |
Setting AN pin state. | |
void | hbridge3_dis_set (hbridge3_t *ctx, uint8_t pin_state) |
Setting RST pin state. | |
void | hbridge3_cs_set (hbridge3_t *ctx, uint8_t pin_state) |
Setting CS pin state. | |
uint8_t | hbridge3_spi (hbridge3_t *ctx, uint8_t spi_command) |
Sending SPI command. | |
This file contains API for H Bridge 3 Click driver.