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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 11 additions & 8 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 6 additions & 3 deletions
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

Lines changed: 5 additions & 2 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 3 additions & 0 deletions
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

0 commit comments

Comments
 (0)