Commit graph

132 commits

Author SHA1 Message Date
bluetooth-mdw
6d9e64fbc6 Minor tweaks to resolve failed tests 2015-10-05 21:08:45 +01:00
bluetooth-mdw
3bb76f6089 Changed event service UUIDs to match code 2015-10-04 16:45:36 +01:00
bluetooth-mdw
9a415f62cb Device Information Service characteristics had wrong UUID (BDS issue) 2015-10-04 16:09:47 +01:00
bluetooth-mdw
a0bcf7912f UUID for Generic Access Service was incorrect (BDS issue). Corrected. 2015-10-04 15:56:04 +01:00
Joe Finney
2230e39340 microbit: BUGFIX: #1291 ManagedString(INT_MIN) does not work properly
Corner case error in serialization code for INT_MIN only - corrected.
2015-09-29 23:51:20 +01:00
bluetooth-mdw
7459213d10 Merge branch 'ble-profile' of https://github.com/lancaster-university/microbit-dal into ble-profile 2015-09-29 11:14:18 +01:00
bluetooth-mdw
3f4a7cf5f1 Removed redundant HTML files 2015-09-29 11:13:59 +01:00
bluetooth-mdw
393cb25bc0 Updated Profile Design section 2015-09-29 11:12:37 +01:00
Joe Finney
5da263db81 Merge branch 'ble-profile' of https://github.com/lancaster-university/microbit-dal into ble-profile 2015-09-28 21:58:37 +01:00
Joe Finney
18236810a3 microbit: BLE Profile Beta 1
First functionally complete BLE profile, matching BLE speicfication v1.6.
More specifically, the following services are now functional:

  - AccelerometerService
  - MeganetometerService
  - EventService
  - TemperatureServide
  - IOPinService
  - DFUService
  - ButtonService
  - LEDService

Also, updates to underlying device drivers to enable greater configurability:

  - MicroBitCompass now supports variable sample rates and temperature sensing
  - MicroBitAccelerometer now supports variable sample rates and ranges
  - MicroBitThermometer introduced
  - MicroBitMessageBus adapted to permit enumeration and block removal of listeners

Finally, MicroBit DFU Service has been changed to the new UUIDs specificed in v1.6 of BLE spec.
2015-09-28 21:40:44 +01:00
Damien George
0dcb6834ec microbit: Use default constructor for MatrixPoint so data is ROMable.
Previous to this patch an explicit constructor was provided for creating
MatrixPoint instances, which meant that such objects could not be put in
ROM (since they needed to be constructed at runtime).

By using the defualt construction method for structs the MatrixPoint map
is now compiled into the rodata section, hence freeing up RAM.

Saves: 4 bytes data, 56 bytes bss, 148 bytes code.
2015-09-25 21:19:10 +01:00
bluetooth-mdw
5b54d1d3c1 Reports now include Summary and Abstract fields from Bluetooth Developer Studio 2015-09-25 11:14:01 +01:00
Joe Finney
4314b68643 microbit: First implementation of Temperature Service 2015-09-23 22:15:44 +01:00
Joe Finney
b00fc85548 Merge branch 'ble-profile' of https://github.com/lancaster-university/microbit-dal into ble-profile 2015-09-22 16:14:42 +01:00
Joe Finney
eb5ed28f74 microbit: First cut at MicroBitButtonService and microBitIOPinService
Strictly still development - untested code.
2015-09-22 16:13:08 +01:00
bluetooth-mdw
dcd03cb4e2 A range of changes motivated mostly by optimisation opportunities and implementation issues. 2015-09-22 15:07:12 +01:00
Joe Finney
ef613e9d86 microbit: Added BLE Magnetometer service compilation, initialization and configuration options 2015-09-19 22:19:57 +01:00
Joe Finney
3cfc7ec6e7 microbit: Ammendments to ensure fiber is never pages out due to eventing and minor cleanups
- renamed fiber flag to be more general.
- renamed idle to idleFiber to be consistent with the rest of the code.
- factored content of idle() into a funciton to avoid dupication.
- added test case to MessageBus::process() to avoid forking fibers if not requested.
- removed fiber_allow_run_idle_within mutator in favour of exposing currentFiber, as a more general solution.
2015-09-19 21:44:58 +01:00
Joe Finney
1e71169550 microbit: First draft of Magnetometer BLE service 2015-09-19 21:03:36 +01:00
Joe Finney
ae0e5611c3 microbit: First draft of reconfigurable frequencies of MicroBitCompass 2015-09-19 21:00:38 +01:00
Damien George
9ccdd25e9f microbit: Allow to run the idle task within the current fiber's stack.
If there is only 1 main fiber (plus the idle fiber) then enabling this
new feature for the main fiber (using fiber_allow_run_idle_within())
will mean that no heap is needed to swap the stack out.
2015-09-19 11:45:45 +01:00
Joe Finney
2c9f63902c microbit: Message Bus updates to support URGENT events queue optimisations
Added new URGENT listener type, that ensures immediate, non queuing delivery of events.
Introduced two-pass algorithm into message bus. Only events with an event listener are now
queued at ingress - this reduces unecessary memory usage for 'uninteresting' events.
2015-09-18 23:20:44 +01:00
Joe Finney
058f73ede1 microbit: Moved MicroBitDFUService UUIDs to match BLE profile specification 2015-09-18 18:48:27 +01:00
bluetooth-mdw
e2f6941728 Fixed file name typo 2015-09-18 13:51:25 +01:00
bluetooth-mdw
aa8e9176bd V1.5 of BLE profile 2015-09-18 08:56:58 +01:00
bluetooth-mdw
4524195f90 Allocated new UUIDs to DFU service and its characteristics to align with standard base UUID 2015-09-18 08:25:11 +01:00
bluetooth-mdw
44fcf4b04e Added suggestion regarding white listing and directed advertising 2015-09-18 07:01:27 +01:00
Joe Finney
ec30695d7d microbit: BUGFIX MicroBit::reset() now operates correctly 2015-09-17 23:32:40 +01:00
Joe Finney
a61bd49620 microbit: BUGFIX: Memory leak in ManagedType.h
Corrected corner case memory leak. Instances of ManagedType<> created using the default
constructor would create a reference counter by default, with a value of 0. However, if
destructor or copy-assigned in this state, this reference count would not be destroyed,
resulting in a 4 byte leak on the heap for each occurence.
2015-09-17 23:16:40 +01:00
bluetooth-mdw
4c8f066261 Added issue T8 - advertising parameters review needed 2015-09-17 16:47:56 +01:00
bluetooth-mdw
dfa32ef79f Merge branch 'ble-profile' of https://github.com/lancaster-university/microbit-dal into ble-profile 2015-09-17 16:25:42 +01:00
bluetooth-mdw
61fd503bba Description of the pairing and FOTA process added to the documentation 2015-09-17 16:25:23 +01:00
Jonathan Protzenko
78ad8a1646 Small tweak for the new ignore function. 2015-09-16 12:08:09 -07:00
Jonathan Protzenko
3158445208 New setAnalogPeriodUs function.
Fixes bbc/microbit-extras#1389.
2015-09-16 11:52:25 -07:00
Joe Finney
a17830030e microbit: HOTFIX: BLE Notification bug in MicroBitDFUService
Hotfix of a minor bug in the MicroBitDFU Service that prevented BLE notifications
from being sent on the FlashCode characterisitic. Needed as the Samsung companion
app is dependent on this functionality to enable BLE programmming of the micro:bit.
2015-09-15 17:03:36 +01:00
Joe Finney
2654265622 Merge branch 'ble-profile' of https://github.com/lancaster-university/microbit-dal into ble-profile 2015-09-15 15:20:03 +01:00
Joe Finney
037ef999eb microbit: Merge branch 'master' into ble-profile
Pulled in changes from MessageBusExtensions to support development of ble profiles.
2015-09-15 15:17:21 +01:00
Joe Finney
ff1faab0ab Merge pull request #4 from lancaster-university/MessageBusExtensions
Message bus extensions
2015-09-15 15:05:19 +01:00
Joe Finney
ccd351a4ed microbit: Added explicit notify() operation to MicroBitDFUService 2015-09-15 14:34:25 +01:00
Joe Finney
3395f66d3d microbit: Added configurable event processing options into MicroBitEvent
Events in the micro:bit runtime are normally launched through making an instance
of the MicroBitEvent class. This update added configuration support to all the
code creating the MicroBitEvent decide if the newly created event should then be
automatically queued on the MessageBus or processed immediately by event handlers.
2015-09-12 11:34:16 +01:00
Joe Finney
7fe731b731 Update README.md 2015-09-11 16:50:28 +01:00
Joe Finney
a875d5fccd microbit: Added configurable concurrency modes for MicroBitMessageBus handlers.
MessageBus handlers can now have one of four concurrency modes for the eventuality
of an event being raised whilst a previous event is still being processed. An additional
(optional) parameter is provided to the listen() functions to allow this to be selected
on a per event handler basis. The permissable options are:

MESSAGE_BUS_LISTENER_REENTRANT:
The event handler is fired with the new event, regardless of whether or not
a previous event is still be processed by that handler.

MESSAGE_BUS_LISTENER_QUEUE_IF_BUSY:
The new event is queued until such a time as the previous event has completed
execution. The new event is then processed. This option does not preclude the
processing of the new event by other event handlers.

MESSAGE_BUS_LISTENER_DROP_IF_BUSY:
The new event is dropped, and will never be processed the the event handler.
This option does not preclude the processing of the new event by other event handlers.

MESSAGE_BUS_LISTENER_NONBLOCKING:
The event handler is self-declaring that it never blocks. This flag is used purely
for optimisation, as it permits direct execution of the event hadnelr without inducing
any overhead from the scheduler.

In addition, the following minor revisions were made in this release:

* Cleanup of the #include dependencies contained in the microbit-dal .h files
* Bugfix to the scheduler block on event matching code.
* Introduced a MICROBIT_ID_ALERT MessageBus channel, for general purpose eventing using nonces.
2015-09-11 16:39:38 +01:00
bluetooth-mdw
9b05dc2708 Removed pin characteristics not relating to the edge connector. 2015-09-11 07:47:36 +01:00
bluetooth-mdw
9cda28c9f8 Adding profile documentation to github 2015-09-10 13:21:11 +01:00
bluetooth-mdw
6219996ed8 Updated 2015-09-10 13:20:53 +01:00
bluetooth-mdw
3d5c156026 Updated wrt latest status 2015-09-10 13:01:24 +01:00
Joe Finney
51493092ff microbit: Added support to remove MicroBitListener event handlers. 2015-09-10 12:53:39 +01:00
bluetooth-mdw
d4575c55f1 ble_issue_tracker.md now the file to track BLE issues in 2015-09-10 10:06:27 +01:00
bluetooth-mdw
2839c131c0 Moved D4 to the Profile Testing section and renumbered 2015-09-10 08:01:12 +01:00
bluetooth-mdw
fbd89ac472 Added simple list of BLE issues to work on and track 2015-09-10 07:57:20 +01:00