stspin233 2.0.0.0
|
Functions | |
void | stspin233_cfg_setup (stspin233_cfg_t *cfg) |
Config Object Initialization function. | |
STSPIN233_RETVAL | stspin233_init (stspin233_t *ctx, stspin233_cfg_t *cfg) |
Initialization function. | |
void | stspin233_default_cfg (stspin233_t *ctx) |
Click Default Configuration function. | |
void | stspin233_generic_write (stspin233_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | stspin233_generic_read (stspin233_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | stspin233_wakeup (stspin233_t *ctx) |
Module wake-up (procedure) | |
void | stspin233_send_single_cmd (stspin233_t *ctx, uint8_t *tx_buf) |
Send single command. | |
void | stspin233_send_double_cmd (stspin233_t *ctx, uint8_t *cmd_buf, uint8_t *arg_buf) |
Send double command. | |
void | stspin233_set_reset_state (stspin233_t *ctx, uint8_t state) |
Set RST pin state. | |
uint8_t | stspin233_get_int_state (stspin233_t *ctx) |
Get INT pin state. | |
void stspin233_cfg_setup | ( | stspin233_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void stspin233_default_cfg | ( | stspin233_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for STSPIN233 click.
int32_t stspin233_generic_read | ( | stspin233_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
ctx | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void stspin233_generic_write | ( | stspin233_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
ctx | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
uint8_t stspin233_get_int_state | ( | stspin233_t * | ctx | ) |
Get INT pin state.
ctx | Click object. |
STSPIN233_RETVAL stspin233_init | ( | stspin233_t * | ctx, |
stspin233_cfg_t * | cfg ) |
Initialization function.
stspin233 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void stspin233_send_double_cmd | ( | stspin233_t * | ctx, |
uint8_t * | cmd_buf, | ||
uint8_t * | arg_buf ) |
Send double command.
ctx | Click object. |
cmd_buf | Command buffer |
arg_buf | Argument buffer |
@Description This function sends two command buffer.
example: Engine direction set command. Command: DIRECT Argument: 0 [CW] or 1 [CCW]
void stspin233_send_single_cmd | ( | stspin233_t * | ctx, |
uint8_t * | tx_buf ) |
Send single command.
ctx | Click object. |
tx_buf | Command buffer |
@Description This function sends one command buffer.
example: Start motor command. Command: STARTM
void stspin233_set_reset_state | ( | stspin233_t * | ctx, |
uint8_t | state ) |
Set RST pin state.
ctx | Click object. |
state | RST pin state |
void stspin233_wakeup | ( | stspin233_t * | ctx | ) |
Module wake-up (procedure)
ctx | Click object. |