Skip to content

Commit 4c86118

Browse files
committed
- add license headers to source files
1 parent 61a029f commit 4c86118

File tree

80 files changed

+257
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+257
-22
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Sandeep Mistry
3+
Copyright (c) 2014-2016 Sandeep Mistry
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

examples/Eddystone/EddystoneUID/EddystoneUID.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (EddystoneBeacon depends on SPI)
25
#include <SPI.h>
36
#include <EddystoneBeacon.h>

examples/Eddystone/EddystoneURL/EddystoneURL.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (EddystoneBeacon depends on SPI)
25
#include <SPI.h>
36
#include <EddystoneBeacon.h>

examples/HID/HID_joystick_mouse/HID_joystick_mouse.ino

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEHIDPeripheral.h>
@@ -26,24 +29,24 @@ void setup() {
2629
#if defined (__AVR_ATmega32U4__)
2730
while(!Serial);
2831
#endif
29-
32+
3033
pinMode(JOYSTICK_BUTTON_PIN, INPUT_PULLUP);
3134
buttonState = digitalRead(JOYSTICK_BUTTON_PIN);
32-
35+
3336
if (buttonState == LOW) {
3437
Serial.println(F("BLE HID Peripheral - clearing bond data"));
35-
38+
3639
// clear bond store data
3740
bleHIDPeripheral.clearBondStoreData();
3841
}
39-
42+
4043
bleHIDPeripheral.setLocalName("HID Mouse");
4144
bleHIDPeripheral.addHID(bleMouse);
4245

4346
bleHIDPeripheral.begin();
4447

4548
Serial.println(F("BLE HID Mouse"));
46-
49+
4750
joystickXCenter = readJoystickAxis(JOYSTICK_X_AXIS_PIN);
4851
joystickYCenter = readJoystickAxis(JOYSTICK_Y_AXIS_PIN);
4952
}
@@ -60,7 +63,7 @@ void loop() {
6063
int tempButtonState = digitalRead(JOYSTICK_BUTTON_PIN);
6164
if (tempButtonState != buttonState) {
6265
buttonState = tempButtonState;
63-
66+
6467
if (buttonState == LOW) {
6568
Serial.println(F("Mouse press"));
6669
bleMouse.press();
@@ -72,7 +75,7 @@ void loop() {
7275

7376
int x = readJoystickAxis(JOYSTICK_X_AXIS_PIN) - joystickXCenter;
7477
int y = readJoystickAxis(JOYSTICK_Y_AXIS_PIN) - joystickYCenter;
75-
78+
7679
if (x || y) {
7780
bleMouse.move(x, y);
7881
}
@@ -88,6 +91,6 @@ int readJoystickAxis(int pin) {
8891
int rawValue = analogRead(pin);
8992
int mappedValue = map(rawValue, 0, 1023, 0, JOYSTICK_RANGE);
9093
int centeredValue = mappedValue - (JOYSTICK_RANGE / 2);
91-
94+
9295
return (centeredValue * -1); // reverse direction
9396
}

examples/HID/HID_keyboard/HID_keyboard.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEHIDPeripheral.h>

examples/HID/HID_keypad/HID_keypad.ino

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEHIDPeripheral.h>
@@ -37,11 +40,11 @@ void setup() {
3740

3841
if (c == '#') {
3942
Serial.println(F("BLE HID Peripheral - clearing bond data"));
40-
43+
4144
// clear bond store data
4245
bleHIDPeripheral.clearBondStoreData();
4346
}
44-
47+
4548
bleHIDPeripheral.setLocalName("HID Keypad");
4649
bleHIDPeripheral.addHID(bleKeyboard);
4750

@@ -60,7 +63,7 @@ void loop() {
6063

6164
while (central.connected()) {
6265
char c = keypad.getKey();
63-
66+
6467
if (c) {
6568
Serial.println(c);
6669
bleKeyboard.print(c);

examples/HID/HID_test/HID_test.ino

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEHIDPeripheral.h>
@@ -25,7 +28,7 @@ void setup() {
2528

2629
// clears bond data on every boot
2730
bleHID.clearBondStoreData();
28-
31+
2932
bleHID.setDeviceName("Arduino BLE HID");
3033
// bleHID.setAppearance(961);
3134

@@ -52,7 +55,7 @@ void loop() {
5255
while (bleHID.connected()) {
5356
if (Serial.available() > 0) {
5457
Serial.read();
55-
58+
5659
// bleMouse.move(100, 100, 0);
5760
// bleKeyboard.press(KEYCODE_A);
5861
bleMultimedia.write(MMKEY_VOL_UP);

examples/HID/HID_volume/HID_volume.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEHIDPeripheral.h>

examples/ancs/ancs.ino

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEPeripheral.h>
@@ -92,7 +95,7 @@ void blePeripheralRemoteServicesDiscoveredHandler(BLECentral& central) {
9295
Serial.print(F("Remote services discovered event, central: "));
9396
Serial.println(central.address());
9497

95-
if (ancsNotificationSourceCharacteristic.canSubscribe()) {
98+
if (ancsNotificationSourceCharacteristic.canSubscribe()) {
9699
ancsNotificationSourceCharacteristic.subscribe();
97100
}
98101
}

examples/iBeacon/iBeacon.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#include <BLEPeripheral.h>
25
#include <iBeacon.h>
36

examples/ir_bridge/ir_bridge.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEPeripheral.h>

examples/led/led.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEPeripheral.h>

examples/led_callback/led_callback.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEPeripheral.h>

examples/led_switch/led_switch.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEPeripheral.h>

examples/remote_service/remote_service.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEPeripheral.h>

examples/remote_test/remote_test.ino

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEPeripheral.h>
@@ -81,23 +84,23 @@ void blePeripheralRemoteServicesDiscoveredHandler(BLECentral& central) {
8184
// Serial.println(F("Read 1"));
8285
// remoteCharacteristic1.read();
8386
// }
84-
//
87+
//
8588
// if (remoteCharacteristic2.canRead()) {
8689
// Serial.println(F("Read 2"));
8790
// remoteCharacteristic2.read();
8891
// }
8992
//
9093
// if (remoteCharacteristic3.canWrite()) {
9194
// Serial.println(F("Write 3"));
92-
//
95+
//
9396
// unsigned long writeValue = 42;
94-
//
97+
//
9598
// remoteCharacteristic3.write((const unsigned char*)&writeValue, sizeof(writeValue));
9699
// }
97-
//
100+
//
98101
// if (remoteCharacteristic4.canSubscribe()) {
99102
// Serial.println(F("Subscribe 4"));
100-
//
103+
//
101104
// remoteCharacteristic4.subscribe();
102105
// }
103106
}

examples/serial/serial.ino

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
/*
25
* Serial Port over BLE
36
* Create UART service compatible with Nordic's *nRF Toolbox* and Adafruit's *Bluefruit LE* iOS/Android apps.
47
*
58
* BLESerial class implements same protocols as Arduino's built-in Serial class and can be used as it's wireless
6-
* replacement. Data transfers are routed through a BLE service with TX and RX characteristics. To make the
9+
* replacement. Data transfers are routed through a BLE service with TX and RX characteristics. To make the
710
* service discoverable all UUIDs are NUS (Nordic UART Service) compatible.
811
*
912
* Please note that TX and RX characteristics use Notify and WriteWithoutResponse, so there's no guarantee

examples/starter/starter.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// Import libraries (BLEPeripheral depends on SPI)
25
#include <SPI.h>
36
#include <BLEPeripheral.h>

examples/temp_sensor/temp_sensor.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
// TimerOne library: https://code.google.com/p/arduino-timerone/
25
#include <TimerOne.h>
36
// DHT library: https://github.com/adafruit/DHT-sensor-library

examples/test/test.ino

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
13

24
//#define SHOW_FREE_MEMORY
35

src/BLEAttribute.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#include "BLEAttribute.h"
25

36
BLEAttribute::BLEAttribute(const char* uuid, enum BLEAttributeType type) :

src/BLEAttribute.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#ifndef _BLE_ATTRIBUTE_H_
25
#define _BLE_ATTRIBUTE_H_
36

src/BLEBondStore.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#ifdef __AVR__
25
#include <avr/eeprom.h>
36
#elif defined(NRF51) || defined(NRF52) || defined(__RFduino__)

src/BLECentral.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#include "Arduino.h"
25

36
#include "BLEPeripheral.h"

src/BLECentral.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#ifndef _BLE_CENTRAL_H_
25
#define _BLE_CENTRAL_H_
36

src/BLECharacteristic.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#include "Arduino.h"
25

36
#include "BLEDeviceLimits.h"

src/BLECharacteristic.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#ifndef _BLE_CHARACTERISTIC_H_
25
#define _BLE_CHARACTERISTIC_H_
36

src/BLEConstantCharacteristic.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#include "BLEConstantCharacteristic.h"
25

36
BLEConstantCharacteristic::BLEConstantCharacteristic(const char* uuid, const unsigned char value[], unsigned char length) :

src/BLEConstantCharacteristic.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#ifndef _BLE_CONSTANT_CHARACTERISTIC_H_
25
#define _BLE_CONSTANT_CHARACTERISTIC_H_
36

src/BLEDescriptor.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#include "Arduino.h"
25

36
#include "BLEDeviceLimits.h"

src/BLEDescriptor.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#ifndef _BLE_DESCRIPTOR_H_
25
#define _BLE_DESCRIPTOR_H_
36

src/BLEDevice.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#include "Arduino.h"
25

36
#include "BLEDevice.h"

src/BLEDevice.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#ifndef _BLE_DEVICE_H_
25
#define _BLE_DEVICE_H_
36

src/BLEDeviceLimits.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#ifndef _BLE_LIMITS_H_
25
#define _BLE_LIMITS_H_
36

src/BLEFixedLengthCharacteristic.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#include "BLEFixedLengthCharacteristic.h"
25

36
BLEFixedLengthCharacteristic::BLEFixedLengthCharacteristic(const char* uuid, unsigned char properties, unsigned char valueSize) :

src/BLEFixedLengthCharacteristic.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Sandeep Mistry. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
14
#ifndef _BLE_FIXED_LENGTH_CHARACTERISTIC_H_
25
#define _BLE_FIXED_LENGTH_CHARACTERISTIC_H_
36

0 commit comments

Comments
 (0)