mirror of
https://github.com/SemvdH/OBD2-car-display.git
synced 2025-12-16 12:41:05 +00:00
add getting state string from bt driver
This commit is contained in:
@@ -21,8 +21,23 @@ Be sure to disconnect the TX and RX pins from the BT module when programming the
|
||||
#ifndef OBD2_BT_H
|
||||
#define OBD2_BT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// #include <Arduino.h>
|
||||
// #include "obd2_util.h"
|
||||
|
||||
/* pins */
|
||||
#define PIN_BT_RX 19
|
||||
#define PIN_BT_TX 18
|
||||
|
||||
#define BT_STATE_PIN 3 /* state connection pin from bluetooth module -> level high on connected */
|
||||
|
||||
#define BT_BAUD 115200
|
||||
|
||||
#define BT_STATE_LENGTH 13 /* length of the string identifier used for the states */
|
||||
|
||||
enum BluetoothState
|
||||
{
|
||||
BT_INITIALISING = 0,
|
||||
@@ -38,6 +53,10 @@ typedef struct obt2_bt_tag
|
||||
|
||||
void obd2_bt_init(obd2_bt_t *bt);
|
||||
void obd2_bt_process(obd2_bt_t *bt);
|
||||
void obd2_bt_get_state(obd2_bt_t *bt, char *state);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // OBD2_BT_H
|
||||
Reference in New Issue
Block a user