Merge branch 'master' into develop
This commit is contained in:
commit
228b5ea722
6 files changed
+46
-34
No files matched your search
@@ -1,14 +0,0 @@
|
||||
---
|
||||
name: For questions please use our forum support
|
||||
about: Please don't open issue for question
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Please DO NOT use GitHub issues for question or troubleshooting projects.** Instead use the forums at http://forums.adafruit.com. Only create issue if it is a bug, feature or discussion that requires **code changes to resolve**.
|
||||
|
||||
**Check our tutorial and examples** There is chance that our tutorial and examples has useful information for you:
|
||||
- [Feather nRF52832 tutorial](https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide)
|
||||
- [Feather nRF52840 tutorial](https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather)
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Questions please use our forum support
|
||||
about: Post your question at forums.adafruit.com
|
||||
about: Don't open issue, post your question at forums.adafruit.com
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
@@ -47,9 +47,9 @@ class SoftwareTimer
|
||||
SoftwareTimer() { _handle = NULL; }
|
||||
virtual ~SoftwareTimer() { if(_handle != NULL) xTimerDelete(_handle, 0); }
|
||||
|
||||
void begin(uint32_t ms, TimerCallbackFunction_t callback)
|
||||
void begin(uint32_t ms, TimerCallbackFunction_t callback, bool repeating = true)
|
||||
{
|
||||
_handle = xTimerCreate(NULL, ms2tick(ms), true, NULL, callback);
|
||||
_handle = xTimerCreate(NULL, ms2tick(ms), repeating, NULL, callback);
|
||||
}
|
||||
|
||||
TimerHandle_t getHandle(void)
|
||||
@@ -59,6 +59,28 @@ class SoftwareTimer
|
||||
|
||||
void start(void) { xTimerStart(_handle, 0); }
|
||||
void stop (void) { xTimerStop (_handle, 0); }
|
||||
void reset(void) { xTimerReset(_handle, 0); }
|
||||
|
||||
bool startFromISR(void) {
|
||||
BaseType_t ret, xHigherPriorityTaskWoken = pdFALSE;
|
||||
ret = xTimerStartFromISR(_handle, &xHigherPriorityTaskWoken);
|
||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
||||
return (ret == pdPASS);
|
||||
}
|
||||
|
||||
bool stopFromISR(void) {
|
||||
BaseType_t ret, xHigherPriorityTaskWoken = pdFALSE;
|
||||
ret = xTimerStopFromISR(_handle, &xHigherPriorityTaskWoken);
|
||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
||||
return (ret == pdPASS);
|
||||
}
|
||||
|
||||
bool resetFromISR(void) {
|
||||
BaseType_t ret, xHigherPriorityTaskWoken = pdFALSE;
|
||||
ret = xTimerResetFromISR(_handle, &xHigherPriorityTaskWoken);
|
||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
||||
return (ret == pdPASS);
|
||||
}
|
||||
|
||||
void setPeriod(uint32_t ms)
|
||||
{
|
||||
|
||||
@@ -531,14 +531,14 @@ ANCS_ACTION_NEGATIVE LITERAL1
|
||||
ANCS_APP_ATTR_DISPLAY_NAME LITERAL1
|
||||
|
||||
#######################################
|
||||
# UUID128 Serivce Constants
|
||||
# UUID128 Service Constants
|
||||
#######################################
|
||||
|
||||
BLEUART_UUID_SERVICE LITERAL1
|
||||
BLEANCS_UUID_SERVICE LITERAL1
|
||||
|
||||
#######################################
|
||||
# UUID16 Serivce Constants
|
||||
# UUID16 Service Constants
|
||||
#######################################
|
||||
UUID16_SVC_ALERT_NOTIFICATION LITERAL1
|
||||
UUID16_SVC_BATTERY LITERAL1
|
||||
@@ -547,6 +547,7 @@ UUID16_SVC_CURRENT_TIME LITERAL1
|
||||
UUID16_SVC_CYCLING_SPEED_AND_CADENCE LITERAL1
|
||||
UUID16_SVC_LOCATION_AND_NAVIGATION LITERAL1
|
||||
UUID16_SVC_DEVICE_INFORMATION LITERAL1
|
||||
UUID16_SVC_ENVIRONMENTAL_SENSING LITERAL1
|
||||
UUID16_SVC_GLUCOSE LITERAL1
|
||||
UUID16_SVC_HEALTH_THERMOMETER LITERAL1
|
||||
UUID16_SVC_HEART_RATE LITERAL1
|
||||
@@ -656,3 +657,4 @@ UUID16_PLX_FEATURES LITERAL1
|
||||
|
||||
|
||||
|
||||
UUID16_CHR_UV_INDEX LITERAL1
|
||||
@@ -84,6 +84,7 @@ class BLEUuid
|
||||
#define UUID16_SVC_CYCLING_POWER 0x1818
|
||||
#define UUID16_SVC_LOCATION_AND_NAVIGATION 0x1819
|
||||
#define UUID16_SVC_DEVICE_INFORMATION 0x180A
|
||||
#define UUID16_SVC_ENVIRONMENTAL_SENSING 0x181A
|
||||
#define UUID16_SVC_GLUCOSE 0x1808
|
||||
#define UUID16_SVC_HEALTH_THERMOMETER 0x1809
|
||||
#define UUID16_SVC_HEART_RATE 0x180D
|
||||
@@ -195,6 +196,7 @@ class BLEUuid
|
||||
#define UUID16_PLX_SPOT_CHECK_MEAS 0x2A5E
|
||||
#define UUID16_PLX_CONTINUOUS_MEAS 0x2A5F
|
||||
#define UUID16_PLX_FEATURES 0x2A60
|
||||
#define UUID16_CHR_UV_INDEX 0x2A76
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Company UUID
|
||||
|
||||
@@ -386,78 +386,78 @@ bool BLEHidAdafruit::mousePan(uint16_t conn_hdl, int8_t pan)
|
||||
//------------- Keyboard -------------//
|
||||
bool BLEHidAdafruit::keyboardReport(hid_keyboard_report_t* report)
|
||||
{
|
||||
return keyboardReport(BLE_GATT_HANDLE_INVALID, report);
|
||||
return keyboardReport(BLE_CONN_HANDLE_INVALID, report);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::keyboardReport(uint8_t modifier, uint8_t keycode[6])
|
||||
{
|
||||
return keyboardReport(BLE_GATT_HANDLE_INVALID, modifier, keycode);
|
||||
return keyboardReport(BLE_CONN_HANDLE_INVALID, modifier, keycode);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::keyPress(char ch)
|
||||
{
|
||||
return keyPress(BLE_GATT_HANDLE_INVALID, ch);
|
||||
return keyPress(BLE_CONN_HANDLE_INVALID, ch);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::keyRelease(void)
|
||||
{
|
||||
return keyRelease(BLE_GATT_HANDLE_INVALID);
|
||||
return keyRelease(BLE_CONN_HANDLE_INVALID);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::keySequence(const char* str, int interval)
|
||||
{
|
||||
return keySequence(BLE_GATT_HANDLE_INVALID, str, interval);
|
||||
return keySequence(BLE_CONN_HANDLE_INVALID, str, interval);
|
||||
}
|
||||
|
||||
//------------- Consumer Media Keys -------------//
|
||||
bool BLEHidAdafruit::consumerReport(uint16_t usage_code)
|
||||
{
|
||||
return consumerReport(BLE_GATT_HANDLE_INVALID, usage_code);
|
||||
return consumerReport(BLE_CONN_HANDLE_INVALID, usage_code);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::consumerKeyPress(uint16_t usage_code)
|
||||
{
|
||||
return consumerKeyPress(BLE_GATT_HANDLE_INVALID, usage_code);
|
||||
return consumerKeyPress(BLE_CONN_HANDLE_INVALID, usage_code);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::consumerKeyRelease(void)
|
||||
{
|
||||
return consumerKeyRelease(BLE_GATT_HANDLE_INVALID);
|
||||
return consumerKeyRelease(BLE_CONN_HANDLE_INVALID);
|
||||
}
|
||||
|
||||
//------------- Mouse -------------//
|
||||
bool BLEHidAdafruit::mouseReport(hid_mouse_report_t* report)
|
||||
{
|
||||
return mouseReport(BLE_GATT_HANDLE_INVALID, report);
|
||||
return mouseReport(BLE_CONN_HANDLE_INVALID, report);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::mouseReport(uint8_t buttons, int8_t x, int8_t y, int8_t wheel, int8_t pan)
|
||||
{
|
||||
return mouseReport(BLE_GATT_HANDLE_INVALID, buttons, x, y, wheel, pan);
|
||||
return mouseReport(BLE_CONN_HANDLE_INVALID, buttons, x, y, wheel, pan);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::mouseButtonPress(uint8_t buttons)
|
||||
{
|
||||
return mouseButtonPress(BLE_GATT_HANDLE_INVALID, buttons);
|
||||
return mouseButtonPress(BLE_CONN_HANDLE_INVALID, buttons);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::mouseButtonRelease(void)
|
||||
{
|
||||
return mouseButtonRelease(BLE_GATT_HANDLE_INVALID);
|
||||
return mouseButtonRelease(BLE_CONN_HANDLE_INVALID);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::mouseMove(int8_t x, int8_t y)
|
||||
{
|
||||
return mouseMove(BLE_GATT_HANDLE_INVALID, x, y);
|
||||
return mouseMove(BLE_CONN_HANDLE_INVALID, x, y);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::mouseScroll(int8_t scroll)
|
||||
{
|
||||
return mouseScroll(BLE_GATT_HANDLE_INVALID, scroll);
|
||||
return mouseScroll(BLE_CONN_HANDLE_INVALID, scroll);
|
||||
}
|
||||
|
||||
bool BLEHidAdafruit::mousePan(int8_t pan)
|
||||
{
|
||||
return mousePan(BLE_GATT_HANDLE_INVALID, pan);
|
||||
return mousePan(BLE_CONN_HANDLE_INVALID, pan);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user