summaryrefslogtreecommitdiff
path: root/doc/dev/app-example/main.c
diff options
context:
space:
mode:
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;
-}