diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-06-19 21:54:28 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-06-19 21:54:28 -0400 |
| commit | 24ac1fdcabdcdb02f9807192d3cb2a4210b4afc8 (patch) | |
| tree | a5e72ff005802c5138c522d3502f706fbae935da /shared-module | |
| parent | a1b5d800f30418a08a39e73ba4b3e276ca6c7241 (diff) | |
WIP: backup only; not compiled
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/bleio/Characteristic.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/shared-module/bleio/Characteristic.h b/shared-module/bleio/Characteristic.h new file mode 100644 index 000000000..27b43588f --- /dev/null +++ b/shared-module/bleio/Characteristic.h @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Dan Halbert for Adafruit Industries + * + * 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_MODULE_BLEIO_CHARACTERISTIC_H +#define MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CHARACTERISTIC_H + +// Flags for each characteristic property. Common across ports. +typedef struct { + bool broadcast : 1; + bool read : 1; + bool write_no_response : 1; + bool write : 1; + bool notify : 1; + bool indicate : 1; +} bleio_characteristic_properties_t; + +#endif // MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CHARACTERISTIC_H |
