Author a simple floor scheduler system

Create a system for queueing floor requests that arrive from button
presses either inside, or outside the cart.

The role of an elevator is to travel to given floors upon request from
users. Making use of a queuing system allows the elevator to schedule
the floors it will visit to maximise efficiency.

The system doesn't actually respond to events currently and is simply a
queue implementation. The file 'include/Charlie/wrap_int.h' is a file
written by Mike Acton for [an article about branchless wrapping of
integers][1].

   [1]: http://cellperformance.beyond3d.com/articles/2006/07/increment-and-decrement-wrapping-values.html
Make request queue access thread safe

Wrap any accesses to `rgQueue` in threading constructs in order to
maintain the request queue's integrity.

The floor request/service model of the elevator falls neatly into the
category of the producerconsumer problem. This makes the problem multi-
threaded so multiple accesses to `rgQueue` must be prevented.
Remove unnecessary header inclusion

Delete the statement `# include <stdbool.h>` from 'src/scheduler.c'.

'stdbool.h' defines C's `bool` type. This isn't used anywhere in the
source.
Modify the type of the queue index variables

Shift the type of `iQueueFront`, `iQueueRear`, and `QueueMax` from
`size_t` to `in32_t`.

Normally pointer arithmetic would be performed using `size_t` variables
but for the sake of the wrapping functions making use of `int32_t` will
prevent errors through type promotions and conversions.
Fix issues relating to `enum EElevatorDirection`

Add the missing `;` to the end of the definition of
`enum EElevatorDirection`, and remove the type declaration from
`GetElevatorDirection(void)`.

The use of a type declaration in `GetElevatorDirection(void)` implies an
incomplete type (which cannot be instantiated).
Include the `void` specified to `Peek()`

The declaration of `Peek(void)` previously lacked the `void` specifier
in its declaration in `GetElevatorDirection(void)`.

While not mandatory, the lack of `void` introduces a declaration that is
ill-formed and can generate issues.
Cover for the lack of `inline`

Make use of a blank define to remove instances of the `inline` keyword.

The current compiler has no definition for `inline` (introduced in C99).
Rather than removing every instance of the word make it invisible to the
compiler until there is support.
Introduce missing header file

Add the file 'cmsis_os.h' to the top of 'src/scheduler.c'.

'cmsis_os.h' includes the declarations of the all operating system
constructs that are required to interfaces with it.
Update 'ChangeLog'

Include information about most recent changes.

Technically, this information is stored in the commit log but it is a
good idea to keep these two logs in sync.
Create and initialise request handler threads

Add a suicidal initialising thread `RequestInitialiser(const void *)`
that creates access-control structures, and spawns the producer
(running `RequestHandler(const void *)` and consumer
(`RequestServicer(const void *)`) threads.

The request queue is populated and emptied via a "producer-consumer"
style system. This system is run on a series of threads in a
self-contained translation unit.
Unify interaction with the outside world

Author the macros `ClearInput, `SetInput`, `TestOutput` that should be
used to query, and set the state of the general register in charge of
the hardware.

Control of the hardware is performed through the setting of values in
certain registers because this process is always the same it can be
abstracted away from specific registers.
React to requests in the queue

Add handling code to `RequestServicer(const void *)` that reacts to the
direction the elevator should be travelling in.

The system needs to provide a way of moving from the current floor to
the next in the queue, and also when the elevator arrives at the correct
floor.
Test, and react to, signals received from hardware

Add bit field tests to discover information from the hardware and update
internals to reflect new information.

The system relies on signals to detect events. As these events happen
the internals of the system need to be updated so that it behaves
correctly.
Merge branch 'feature/scheduler' into 'development'
Resolve minor merge issues with 'charlie.uvprojx'

Add all current source files ('src/main.c', 'src/scheduler.c' and
'include/Charlie/wrap_int.h') to the IDE configuration files.

Several source files were left outside of the uVision project resulting
in them being ignored during a build.
Correct the type of `argv` in `main`

Change the type of `argv` from `char *argv` to `char *argv[]`.

The previous type of `argv` is an obvious typo that doesn't prevent
compilation but is erronous.