spirit 2.0.0.0
|
API for configuring and manipulating SPIRIT Click driver. More...
Functions | |
void | spirit_cfg_setup (spirit_cfg_t *cfg) |
SPIRIT configuration object setup function. | |
err_t | spirit_init (spirit_t *ctx, spirit_cfg_t *cfg) |
SPIRIT initialization function. | |
void | spirit_power_module (spirit_t *ctx, uint8_t power_state) |
Power module function. | |
void | spirit_reset (spirit_t *ctx) |
Software reset function. | |
void | spirit_set_mode (spirit_t *ctx, uint8_t mode) |
Set mode function. | |
void | spirit_generic_write (spirit_t *ctx, char *data_buf, uint16_t len) |
SPIRIT data writing function. | |
int32_t | spirit_generic_read (spirit_t *ctx, char *data_buf, uint16_t max_len) |
SPIRIT data reading function. | |
void | spirit_send_cmd (spirit_t *ctx, char *cmd) |
Send command function. | |
void | spirit_send_cmd_with_parameter (spirit_t *ctx, char *at_cmd_buf, char *param_buf) |
Send command function with parameter. | |
void | spirit_send_cmd_check (spirit_t *ctx, char *at_cmd_buf) |
Check the sent command. | |
void | spirit_send_cmd_parameter_check (spirit_t *ctx, char *at_cmd_buf) |
Check the command parameters. | |
API for configuring and manipulating SPIRIT Click driver.
void spirit_cfg_setup | ( | spirit_cfg_t * | cfg | ) |
SPIRIT configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See spirit_cfg_t object definition for detailed explanation. |
int32_t spirit_generic_read | ( | spirit_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
SPIRIT data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See spirit_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.void spirit_generic_write | ( | spirit_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
SPIRIT data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See spirit_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.err_t spirit_init | ( | spirit_t * | ctx, |
spirit_cfg_t * | cfg ) |
SPIRIT initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See spirit_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See spirit_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void spirit_power_module | ( | spirit_t * | ctx, |
uint8_t | power_state ) |
Power module function.
Function for power mode of SPIRIT click.
ctx | Click object. |
power_state | State of PWM pin |
void spirit_reset | ( | spirit_t * | ctx | ) |
Software reset function.
Function for reseting SPIRIT click.
ctx | Click object. |
void spirit_send_cmd | ( | spirit_t * | ctx, |
char * | cmd ) |
Send command function.
This function sends the specified command to the click module.
[in] | ctx | : Click context object. See spirit_t object definition for detailed explanation. |
[in] | cmd | Command variable. |
void spirit_send_cmd_check | ( | spirit_t * | ctx, |
char * | at_cmd_buf ) |
Check the sent command.
This function checks the command that is sent.
[in] | ctx | : Click context object. See spirit_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
void spirit_send_cmd_parameter_check | ( | spirit_t * | ctx, |
char * | at_cmd_buf ) |
Check the command parameters.
This function checks the command that is sent.
[in] | ctx | : Click context object. See spirit_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
void spirit_send_cmd_with_parameter | ( | spirit_t * | ctx, |
char * | at_cmd_buf, | ||
char * | param_buf ) |
Send command function with parameter.
This function sends commands to the click module.
[in] | ctx | : Click context object. See spirit_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
[in] | param_buf | Parameter buffer. |
void spirit_set_mode | ( | spirit_t * | ctx, |
uint8_t | mode ) |
Set mode function.
Function for setting mode of SPIRIT click.
ctx | Click object. |
mode | Set mode. |