From 5232b8a501243e4681ac58d9e905b060451bdfa8 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 22 Feb 2023 18:26:55 +0100 Subject: [PATCH] Add missing files. --- .vscode/tasks.json | 30 ++++++++++++++++++++++++++++++ src/include/ftdi_utils.h | 7 +++++++ 2 files changed, 37 insertions(+) create mode 100644 .vscode/tasks.json create mode 100644 src/include/ftdi_utils.h diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..f4d2614 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,30 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: gcc build active file", + "command": "/usr/bin/gcc", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}/${fileBasenameNoExtension}", + "-I/usr/include/libftdi1", + "-lftdi1" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/src/include/ftdi_utils.h b/src/include/ftdi_utils.h new file mode 100644 index 0000000..e874937 --- /dev/null +++ b/src/include/ftdi_utils.h @@ -0,0 +1,7 @@ +#include + +extern struct ftdi_context *ftdi; + +ftdi_context* get_ftdi_context() { + return ftdi; +} \ No newline at end of file