Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Definition for known format types. #230

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ArduinoBLE.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#ifndef _ARDUINO_BLE_H_
#define _ARDUINO_BLE_H_

#include "definitions/BLEDefinitions.h"
#include "local/BLELocalDevice.h"
#include "BLEProperty.h"
#include "BLEStringCharacteristic.h"
Expand Down
25 changes: 25 additions & 0 deletions src/definitions/BLEDefinitions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
This file is part of the ArduinoBLE library.
Copyright (c) 2018 Arduino SA. All rights reserved.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef _BLE_DEFINITIONS_H_
#define _BLE_DEFINITIONS_H_

#include "BLEFormatTypes.h"

#endif
43 changes: 43 additions & 0 deletions src/definitions/BLEFormatTypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
This file is part of the ArduinoBLE library.
Copyright (c) 2018 Arduino SA. All rights reserved.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef _BLE_FORMAT_TYPES_H_
#define _BLE_FORMAT_TYPES_H_

const char BleBoolean[] = "\x01"; /* unsigned 1-bit integer, 0-false, 1-true */
const char Ble2bit[] = "\x02"; /* unsigned 2-bit integer */
const char BleNibble[] = "\x03"; /* unsigned 4-bit integer */
const char BleUint8[] = "\x04"; /* unsigned 8-bit integer */
const char BleUint12[] = "\x05"; /* unsigned 12-bit integer */
const char BleUint16[] = "\x06"; /* unsigned 16-bit integer */
const char BleUint24[] = "\x07"; /* unsigned 24-bit integer */
const char BleUint32[] = "\x08"; /* unsigned 32-bit integer */
const char BleUint48[] = "\x09"; /* unsigned 48-bit integer */
const char BleUint64[] = "\x0A"; /* unsigned 64-bit integer */
const char BleUint128[] = "\x0B"; /* unsigned 128-bit integer */
const char BleInt8[] = "\x0C"; /* signed 8-bit integer */
const char BleInt12[] = "\x0D"; /* signed 12-bit integer */
const char BleInt16[] = "\x0E"; /* signed 16-bit integer */
const char BleInt24[] = "\x0F"; /* signed 24-bit integer */
const char BleInt32[] = "\x10"; /* signed 32-bit integer */
const char BleInt48[] = "\x11"; /* signed 48-bit integer */
const char BleInt64[] = "\x12"; /* signed 64-bit integer */
const char BleInt128[] = "\x13"; /* signed 128-bit integer */

#endif