mirror of
https://github.com/SemvdH/OBD2-car-display.git
synced 2025-12-16 12:41:05 +00:00
update bluetooth driver (made a start)
This commit is contained in:
@@ -21,4 +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
|
||||
|
||||
#define BT_STATE_PIN 3 /* state connection pin from bluetooth module -> level high on connected */
|
||||
|
||||
enum BluetoothState
|
||||
{
|
||||
BT_INITIALISING = 0,
|
||||
BT_CONNECTING = 1,
|
||||
BT_CONNECTED = 2
|
||||
};
|
||||
|
||||
typedef struct obt2_bt_tag
|
||||
{
|
||||
enum BluetoothState state;
|
||||
void (*on_state_change)();
|
||||
} obd2_bt_t;
|
||||
|
||||
void obd2_bt_init(obd2_bt_t *bt);
|
||||
void obd2_bt_process(obd2_bt_t *bt);
|
||||
|
||||
|
||||
#endif // OBD2_BT_H
|
||||
Reference in New Issue
Block a user