summaryrefslogtreecommitdiff
path: root/shared-bindings/bleio/UUID.h
diff options
context:
space:
mode:
authorarturo182 <arturo182@tlen.pl>2018-07-16 14:44:20 +0200
committerarturo182 <arturo182@tlen.pl>2018-10-21 15:43:08 +0200
commitf4940c9aec2ac73086efe18fbc57151f55c85981 (patch)
tree633bbd5f1c054760b409e6638a9c8c0296ab9a49 /shared-bindings/bleio/UUID.h
parentb436666e852b0d75a970052997ea019af7411b45 (diff)
nrf: Move the UUID class from ubluepy to the shared bleio module
Also added a UUIDType enum-like class for determining UUID type.
Diffstat (limited to 'shared-bindings/bleio/UUID.h')
-rw-r--r--shared-bindings/bleio/UUID.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/shared-bindings/bleio/UUID.h b/shared-bindings/bleio/UUID.h
new file mode 100644
index 000000000..d6fcbac1b
--- /dev/null
+++ b/shared-bindings/bleio/UUID.h
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2018 Artur Pacholec
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_UUID_H
+#define MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_UUID_H
+
+#include "common-hal/bleio/UUID.h"
+#include "shared-bindings/bleio/UUIDType.h"
+
+extern const mp_obj_type_t bleio_uuid_type;
+
+extern void common_hal_bleio_uuid_construct(bleio_uuid_obj_t *self, const mp_obj_t *uuid);
+extern void common_hal_bleio_uuid_print(bleio_uuid_obj_t *self, const mp_print_t *print);
+extern bleio_uuid_type_t common_hal_bleio_uuid_get_type(bleio_uuid_obj_t *self);
+
+#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_UUID_H