Commit Graph

10 Commits (d9d2343ab63a707ac9d0167545261ab57b996430)

Author SHA1 Message Date
James Devine 983e9e1ad3 microbit: added Servo API to MicroBitPin
* Added a number of #defines to MicroBitPin.h which ultimately lead to retabulation of the #defines

* Added two new instance methods:

	- setServoValue() which sets the default servo period (20ms) and accepts a value in the range
			  0 - 180, which maps to a duty cycle between 5% and 10% respectively. This
			  mapping is also configurable.

	- setServoPulseUs() which accepts a pulse width in microseconds, and maps it onto the PWM
2016-01-12 20:54:09 +00:00
James Devine 2650aaa569 microbit: MicroBitPin api additions
Based on the previous commit, the api for MicroBitPin
has two new accessor methods:

	* getAnalogPeriodUs
	* getAnalogPeriod

There are also whitespace changes in the MicroBitPin head file
as well as some minor textual changes.
2016-01-12 20:52:50 +00:00
Joe Finney 09cc2d73f4 microbit: update of edge connector pin mappings to match updated hardware design.
Definitions of pins changed as follows:

MICROBIT_PIN_P6 =>  P0_12 (COL9)
MICROBIT_PIN_P7 =>  P0_11 (COL8)
MICROBIT_PIN_P9 =>  P0_10 (COL7)
2016-01-12 14:50:36 +00:00
Joe Finney 823a956d68 microbit: First cut at updates to provide tight validation within the runtime code, with a view to moving
NOP/clamping behaviour out of teh micro:bit runtime and into the glue layers of higher level

 - Updates to many functions to provide explicut return codes.
 - Updates to many functions to remove heuristic calidation (NOP/clamping/defaults)
 - Updates to ErrorNo.h to provide clearer return values, and place return values in a better scope
 - Updates to MicroBitDisplay to use enums where appropriate.
2015-10-25 21:51:33 +00:00
Joe Finney 80f79f7faf Merge branch 'master' into ble-profile
2015-10-18 17:54:37 +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
Jonathan Protzenko 3158445208 New setAnalogPeriodUs function.
Fixes bbc/microbit-extras#1389.
2015-09-16 11:52:25 -07: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:

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

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.

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.

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
Jonathan Protzenko 6e65c33e88 Expose PinName for PWM purposes. 2015-08-14 15:51:16 -07:00
James Devine 538e1c48bd microbit-dal: Initial Commit
This is the first commit of the microbit-dal on GitHub.
This repository contains the runtime, which is a light
weight operating system developed by Lancaster University.
2015-08-12 11:53:41 +01:00