forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttribute.c
More file actions
26 lines (23 loc) · 834 Bytes
/
Copy pathAttribute.c
File metadata and controls
26 lines (23 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2019 Dan Halbert for Adafruit Industries
//
// SPDX-License-Identifier: MIT
#include <string.h>
#include "py/runtime.h"
#include "shared-bindings/_bleio/Attribute.h"
void common_hal_bleio_attribute_security_mode_check_valid(bleio_attribute_security_mode_t security_mode) {
switch (security_mode) {
case SECURITY_MODE_NO_ACCESS:
case SECURITY_MODE_OPEN:
case SECURITY_MODE_ENC_NO_MITM:
case SECURITY_MODE_ENC_WITH_MITM:
case SECURITY_MODE_LESC_ENC_WITH_MITM:
case SECURITY_MODE_SIGNED_NO_MITM:
case SECURITY_MODE_SIGNED_WITH_MITM:
break;
default:
mp_arg_error_invalid(MP_QSTR_security_mode);
break;
}
}