mirror of
https://github.com/SemvdH/OBD2-car-display.git
synced 2025-12-15 20:21:03 +00:00
add comments to bluetooth driver
This commit is contained in:
@@ -45,14 +45,38 @@ enum BluetoothState
|
|||||||
BT_CONNECTED = 2
|
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
|
typedef struct obt2_bt_tag
|
||||||
{
|
{
|
||||||
enum BluetoothState state;
|
enum BluetoothState state;
|
||||||
void (*on_state_change)();
|
void (*on_state_change)();
|
||||||
} obd2_bt_t;
|
} 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);
|
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);
|
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);
|
void obd2_bt_get_state(obd2_bt_t *bt, char *state);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user