calypso
2.1.0.0
|
API for configuring and manipulating Calypso Click driver. More...
Modules | |
Calypso Device Settings | |
Settings for registers of Calypso Click driver. | |
Calypso MikroBUS Map | |
MikroBUS pin mapping of Calypso Click driver. | |
Functions | |
void | calypso_cfg_setup (calypso_cfg_t *cfg) |
Calypso configuration object setup function. More... | |
err_t | calypso_init (calypso_t *ctx, calypso_cfg_t *cfg) |
Calypso initialization function. More... | |
err_t | calypso_default_cfg (calypso_t *ctx) |
Calypso default configuration function. More... | |
err_t | calypso_generic_write (calypso_t *ctx, uint8_t *data_in, uint16_t len) |
Calypso data writing function. More... | |
err_t | calypso_generic_read (calypso_t *ctx, uint8_t *data_out, uint16_t len) |
Calypso data reading function. More... | |
err_t | calypso_port_expander_write (calypso_t *ctx, uint8_t reg, uint8_t data_in) |
Calypso port expander data writing function. More... | |
err_t | calypso_port_expander_read (calypso_t *ctx, uint8_t reg, uint8_t *data_out) |
Calypso port expander data reading function. More... | |
err_t | calypso_set_pins (calypso_t *ctx, uint8_t set_mask, uint8_t clr_mask) |
Calypso set port expander pin function. More... | |
err_t | calypso_set_app_mode (calypso_t *ctx, uint8_t mode_sel) |
Calypso set app mode function. More... | |
void | calypso_set_rst_pin (calypso_t *ctx, uint8_t pin_state) |
Calypso set RST pin function. More... | |
void | calypso_set_cts_pin (calypso_t *ctx, uint8_t pin_state) |
Calypso set CTS pin function. More... | |
void | calypso_set_wup_pin (calypso_t *ctx, uint8_t pin_state) |
Calypso set WUP pin function. More... | |
uint8_t | calypso_get_rts_pin (calypso_t *ctx) |
Calypso get RTS pin state function. More... | |
uint8_t | calypso_get_rm0_pin (calypso_t *ctx) |
Calypso get RM0 pin state function. More... | |
void | calypso_hw_reset (calypso_t *ctx) |
Calypso HW reset function. More... | |
void | calypso_send_cmd (calypso_t *ctx, uint8_t *at_cmd_buf) |
Calypso send command function. More... | |
void | calypso_send_cmd_with_par (calypso_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf) |
Calypso send command with parameter function. More... | |
void | calypso_send_cmd_check (calypso_t *ctx, uint8_t *at_cmd_buf) |
Calypso send command check function. More... | |
API for configuring and manipulating Calypso Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void calypso_cfg_setup | ( | calypso_cfg_t * | cfg | ) |
Calypso configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See calypso_cfg_t object definition for detailed explanation. |
err_t calypso_default_cfg | ( | calypso_t * | ctx | ) |
Calypso default configuration function.
This function executes a default configuration of CALYPSO Click board.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t calypso_generic_read | ( | calypso_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
Calypso data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t calypso_generic_write | ( | calypso_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
Calypso data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. uint8_t calypso_get_rm0_pin | ( | calypso_t * | ctx | ) |
Calypso get RM0 pin state function.
This function is used to get RM0 pin state.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
uint8_t calypso_get_rts_pin | ( | calypso_t * | ctx | ) |
Calypso get RTS pin state function.
This function is used to get RTS pin state.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
void calypso_hw_reset | ( | calypso_t * | ctx | ) |
Calypso HW reset function.
This function is used to perform HW reset.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
err_t calypso_init | ( | calypso_t * | ctx, |
calypso_cfg_t * | cfg | ||
) |
Calypso initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See calypso_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t calypso_port_expander_read | ( | calypso_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
Calypso port expander data reading function.
This function reads a data byte from the selected register.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | reg | : Register to be read. |
[out] | data_out | : Read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t calypso_port_expander_write | ( | calypso_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
Calypso port expander data writing function.
This function writes a data byte into the selected register.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | reg | : Register to be written. |
[in] | data_in | : Data for sending. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void calypso_send_cmd | ( | calypso_t * | ctx, |
uint8_t * | at_cmd_buf | ||
) |
Calypso send command function.
This function is used to send a desired command.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command string. |
void calypso_send_cmd_check | ( | calypso_t * | ctx, |
uint8_t * | at_cmd_buf | ||
) |
Calypso send command check function.
This function sends a desired command with the question mark for checking parameters.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command string. |
void calypso_send_cmd_with_par | ( | calypso_t * | ctx, |
uint8_t * | at_cmd_buf, | ||
uint8_t * | param_buf | ||
) |
Calypso send command with parameter function.
This function sends a desired command with the parameter.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command string. |
[in] | param_buf | : Parameters string. |
err_t calypso_set_app_mode | ( | calypso_t * | ctx, |
uint8_t | mode_sel | ||
) |
Calypso set app mode function.
This function is used to set selected APP mode of CALYPSO Click board.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | mode_sel | : Selected APP mode. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void calypso_set_cts_pin | ( | calypso_t * | ctx, |
uint8_t | pin_state | ||
) |
Calypso set CTS pin function.
This function is used to set CTS pin state.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | pin_state | : State of the CTS pin. |
err_t calypso_set_pins | ( | calypso_t * | ctx, |
uint8_t | set_mask, | ||
uint8_t | clr_mask | ||
) |
Calypso set port expander pin function.
This function is used to set port expander pin state.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | set_mask | : Pin set HIGH. |
[in] | clr_mask | : Pin set LOW. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void calypso_set_rst_pin | ( | calypso_t * | ctx, |
uint8_t | pin_state | ||
) |
Calypso set RST pin function.
This function is used to set RST pin state.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | pin_state | : State of the RST pin. |
void calypso_set_wup_pin | ( | calypso_t * | ctx, |
uint8_t | pin_state | ||
) |
Calypso set WUP pin function.
This function is used to set WUP pin state.
[in] | ctx | : Click context object. See calypso_t object definition for detailed explanation. |
[in] | pin_state | : State of the WUP pin. |