From 4aa55b653a59c9121ac7fa57120a26960f89505e Mon Sep 17 00:00:00 2001 From: shmohawk Date: Fri, 26 Jul 2024 16:21:33 +0200 Subject: [PATCH 1/3] Create blueutil.h --- blueutil.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 blueutil.h diff --git a/blueutil.h b/blueutil.h new file mode 100644 index 0000000..9449cc1 --- /dev/null +++ b/blueutil.h @@ -0,0 +1,16 @@ +// +// blueutil.h +// blueutil +// +// Created by shmohawk on 7/26/24. +// +// + +#ifndef blueutil_blueutil_h +#define blueutil_blueutil_h + +int BTPowerState(); +int BTSetPowerState(int powerState); +void BTStatus(); + +#endif From 51efc3a81711736f7104a76a643b5cfe84567ba2 Mon Sep 17 00:00:00 2001 From: shmohawk Date: Fri, 26 Jul 2024 16:22:42 +0200 Subject: [PATCH 2/3] Added include for blueutil.h --- blueutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blueutil.c b/blueutil.c index d19b1b2..4630407 100644 --- a/blueutil.c +++ b/blueutil.c @@ -15,7 +15,8 @@ #include #include #include -#include "bluetooth.h" +#include "Bluetooth.h" +#include "blueutil.h" #define ON 1 #define OFF 0 From a1140e786fbcf3c886715e2270c678d89c3395ae Mon Sep 17 00:00:00 2001 From: shmohawk Date: Fri, 26 Jul 2024 16:30:46 +0200 Subject: [PATCH 3/3] Create Makefile --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5ffb1a2 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +all: + clang -framework Foundation -framework IOBluetooth -o blueutil blueutil.c + +install: all + cp -r blueutil /usr/local/bin + +clean: + rm -f $(OBJS) $(OUT)