summaryrefslogtreecommitdiff
path: root/doc/dev/app-example/main.c
diff options
context:
space:
mode:
authornightwalker-87 <15526941+Nightwalker-87@users.noreply.github.com>2024-02-01 00:01:58 +0100
committernightwalker-87 <15526941+Nightwalker-87@users.noreply.github.com>2024-02-01 00:01:58 +0100
commit40948aa3de78778f51af02d795327ac20fa385d3 (patch)
treeb2c46fa5d48d1c12a3b1f95f93917bbba6405a2e /doc/dev/app-example/main.c
parente662da00ca294c874655c65cffae3edde97343e5 (diff)
parent133c2564dee478ed2fcf634ae217441ac723b3e3 (diff)
Merge remote-tracking branch 'origin/develop'v1.8.0origin/mastermasterfor-upstream
Diffstat (limited to 'doc/dev/app-example/main.c')
-rw-r--r--doc/dev/app-example/main.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/doc/dev/app-example/main.c b/doc/dev/app-example/main.c
deleted file mode 100644
index b8e64b2..0000000
--- a/doc/dev/app-example/main.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stlink.h>
-
-static stlink_t *stlink_open_first(void) {
- stlink_t* sl = NULL;
- sl = stlink_v1_open(0, 1);
- if (sl == NULL)
- sl = stlink_open_usb(0, 1, NULL);
-
- return sl;
-}
-
-
-int main() {
- stlink_t* sl = NULL;
- sl = stlink_open_first();
-
- if (sl == NULL) {
- fprintf(stderr, "Failed to open stlink device ;(\n");
- exit(1);
- }
-
- fprintf(stderr, "STlink device opened, that's cool!\n");
- stlink_close(sl);
-
- return 0;
-}