obdii
2.1.0.0
|
API for configuring and manipulating OBDII Click driver. More...
Modules | |
OBDII Device Settings | |
Settings for registers of OBDII Click driver. | |
OBDII MikroBUS Map | |
MikroBUS pin mapping of OBDII Click driver. | |
Functions | |
void | obdii_cfg_setup (obdii_cfg_t *cfg) |
OBDII configuration object setup function. More... | |
err_t | obdii_init (obdii_t *ctx, obdii_cfg_t *cfg) |
OBDII initialization function. More... | |
err_t | obdii_generic_write (obdii_t *ctx, uint8_t *data_in, uint16_t len) |
OBDII data writing function. More... | |
err_t | obdii_generic_read (obdii_t *ctx, uint8_t *data_out, uint16_t len) |
OBDII data reading function. More... | |
void | obdii_send_command (obdii_t *ctx, uint8_t *cmd) |
OBDII send command function. More... | |
void | obdii_reset_device (obdii_t *ctx) |
OBDII reset device function. More... | |
void | obdii_set_rst_pin (obdii_t *ctx, uint8_t state) |
OBDII set rst pin function. More... | |
uint8_t | obdii_get_int_pin (obdii_t *ctx) |
OBDII get int pin function. More... | |
API for configuring and manipulating OBDII Click driver.
void obdii_cfg_setup | ( | obdii_cfg_t * | cfg | ) |
OBDII configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See obdii_cfg_t object definition for detailed explanation. |
err_t obdii_generic_read | ( | obdii_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
OBDII data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See obdii_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 obdii_generic_write | ( | obdii_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
OBDII data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See obdii_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 obdii_get_int_pin | ( | obdii_t * | ctx | ) |
OBDII get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See obdii_t object definition for detailed explanation. |
err_t obdii_init | ( | obdii_t * | ctx, |
obdii_cfg_t * | cfg | ||
) |
OBDII initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See obdii_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See obdii_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void obdii_reset_device | ( | obdii_t * | ctx | ) |
OBDII reset device function.
This function resets the device by toggling the RST pin.
[in] | ctx | : Click context object. See obdii_t object definition for detailed explanation. |
void obdii_send_command | ( | obdii_t * | ctx, |
uint8_t * | cmd | ||
) |
OBDII send command function.
This function sends command string by using UART serial interface.
[in] | ctx | : Click context object. See obdii_t object definition for detailed explanation. |
[in] | cmd | : Command string to send. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation.