hbridge5 2.0.0.0
|
Functions | |
void | hbridge5_cfg_setup (hbridge5_cfg_t *cfg) |
Config Object Initialization function. | |
HBRIDGE5_RETVAL | hbridge5_init (hbridge5_t *ctx, hbridge5_cfg_t *cfg) |
Initialization function. | |
void | hbridge5_default_cfg (hbridge5_t *ctx) |
Click Default Configuration function. | |
void | hbridge5_generic_write (hbridge5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | hbridge5_generic_read (hbridge5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | hbridge5_rst_state (hbridge5_t *ctx, uint8_t state) |
Resets pin state. | |
uint8_t | hbridge5_get_interrupt_state (hbridge5_t *ctx) |
Reads interrupt pin state. | |
uint8_t | hbridge5_read_byte (hbridge5_t *ctx, uint8_t cmd) |
Function reads byte from register. | |
void | hbridge5_write_byte (hbridge5_t *ctx, uint8_t cmd, uint8_t data_in) |
Function writes one byte in register. | |
void | hbridge5_set_port (hbridge5_t *ctx, uint8_t port, uint8_t value) |
Function sets port. | |
void | hbridge5_reverse (hbridge5_t *ctx) |
Puts motor into reverse motion. | |
void | hbridge5_forward (hbridge5_t *ctx) |
Puts motor into forward motion. | |
void | hbridge5_brake_low (hbridge5_t *ctx) |
Puts motor to a halt. | |
void | hbridge5_brake_high (hbridge5_t *ctx) |
Puts motor to a halt. | |
void | hbridge5_sync_decay_fwd (hbridge5_t *ctx) |
Synchronization fast decay foreward function. | |
void | hbridge5_sync_decay_rev (hbridge5_t *ctx) |
Synchronization fast decay reverse function. | |
void | hbridge5_sleep (hbridge5_t *ctx, uint8_t state) |
Sleep function. | |
void | hbridge5_configuration (hbridge5_t *ctx, uint8_t cfg_data) |
Configuration function. | |
uint8_t | hbridge5_n_fault_check (hbridge5_t *ctx) |
N fault check function. | |
void hbridge5_brake_high | ( | hbridge5_t * | ctx | ) |
Puts motor to a halt.
ctx | Click object. |
@description Function is used to brake motor to a halt.
void hbridge5_brake_low | ( | hbridge5_t * | ctx | ) |
Puts motor to a halt.
ctx | Click object. |
@description Function is used to brake motor to a halt.
void hbridge5_cfg_setup | ( | hbridge5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void hbridge5_configuration | ( | hbridge5_t * | ctx, |
uint8_t | cfg_data ) |
Configuration function.
ctx | Click object. |
cfg_data | Configuration data. |
@description Function is used to configure the device.
void hbridge5_default_cfg | ( | hbridge5_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for HBridge5 click.
void hbridge5_forward | ( | hbridge5_t * | ctx | ) |
Puts motor into forward motion.
ctx | Click object. |
@description Function is used to put motor into forward motion.
void hbridge5_generic_read | ( | hbridge5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void hbridge5_generic_write | ( | hbridge5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t hbridge5_get_interrupt_state | ( | hbridge5_t * | ctx | ) |
Reads interrupt pin state.
ctx | Click object. |
@description This function reads int_pin state.
HBRIDGE5_RETVAL hbridge5_init | ( | hbridge5_t * | ctx, |
hbridge5_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t hbridge5_n_fault_check | ( | hbridge5_t * | ctx | ) |
N fault check function.
ctx | Click object. |
@description Function is used to check n fault.
uint8_t hbridge5_read_byte | ( | hbridge5_t * | ctx, |
uint8_t | cmd ) |
Function reads byte from register.
ctx | Click object. |
cmd | Command register which will be read. |
one | byte data which is read from the register |
@description This function reads one byte from register.
void hbridge5_reverse | ( | hbridge5_t * | ctx | ) |
Puts motor into reverse motion.
ctx | Click object. |
@description Function is used to put motor into reverse motion.
void hbridge5_rst_state | ( | hbridge5_t * | ctx, |
uint8_t | state ) |
Resets pin state.
ctx | Click object. |
state | 0 - pin cleared / 1 - pin set. |
@description Function is used to set the state of RST pin in order to reset the device.
void hbridge5_set_port | ( | hbridge5_t * | ctx, |
uint8_t | port, | ||
uint8_t | value ) |
Function sets port.
ctx | Click object. |
port | Port to be set up. |
value | Value to which the selected port is being set. |
@description This function sets port.
void hbridge5_sleep | ( | hbridge5_t * | ctx, |
uint8_t | state ) |
Sleep function.
ctx | Click object. |
state | 0 - pin cleared / 1 - pin set. |
@description Function is used to put device into sleep mode or to wake it up.
void hbridge5_sync_decay_fwd | ( | hbridge5_t * | ctx | ) |
Synchronization fast decay foreward function.
ctx | Click object. |
@description Function is used to apply synchronization fast decay.
void hbridge5_sync_decay_rev | ( | hbridge5_t * | ctx | ) |
Synchronization fast decay reverse function.
ctx | Click object. |
@description Function is used to apply synchronization fast decay.
void hbridge5_write_byte | ( | hbridge5_t * | ctx, |
uint8_t | cmd, | ||
uint8_t | data_in ) |
Function writes one byte in register.
ctx | Click object. |
cmd | Command in which the data will be written. |
data_in | Data which will be written in the register. |
@description This function writes one byte in register.