diff --git a/due_obd2/obd2_bt.h b/due_obd2/obd2_bt.h index e851273..e5a335a 100644 --- a/due_obd2/obd2_bt.h +++ b/due_obd2/obd2_bt.h @@ -45,14 +45,38 @@ enum BluetoothState BT_CONNECTED = 2 }; +/** + * @brief struct to hold bluetooth module data + * + * @param state the current state of the bluetooth module + * @param on_state_change function pointer to the function to be called when the state changes + */ typedef struct obt2_bt_tag { enum BluetoothState state; void (*on_state_change)(); } obd2_bt_t; +/** + * @brief initializes the bluetooth module driver + * + * @param bt pointer to struct holding bluetooth driver data + */ void obd2_bt_init(obd2_bt_t *bt); + +/** + * @brief processes the bluetooth module communication with the OBD2 reader + * + * @param bt pointer to struct holding bluetooth driver data + */ void obd2_bt_process(obd2_bt_t *bt); + +/** + * @brief copies the current state of the bluetooth module to the state string + * + * @param bt pointer to struct holding bluetooth driver data + * @param state resulting string to hold the text representation of the state + */ void obd2_bt_get_state(obd2_bt_t *bt, char *state); #ifdef __cplusplus