cc2540: Add support for CC2540 SoC

This patch adds the initial support for TI's CC2540 System-on-Chip.
It basically adds the cc2540.h header which defines some macros to
access Special Function Registers (SFR) and the interrupt numbers
from CC2540 SoC. It also adds the Makefile.cc2540 with the compiling
directives in order to build platforms based on CC2540 SoC.

These initial files were written base on cpu/cc253x files.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
cc2540: Add clock module support

This patch adds support for clock module to CC2540 SoC.

Since clock_wait(), clock_delay_usec() and clock_fine_max() are
only used in platform specific code, we don't implement them by
now. We might support them when they are needed.

The deprecated function clock_fine() is lacking a proper
documentation so we define it as an empty function. Some other
SoC clock implementations don't even define this function.

Moreover, clock_set_seconds(), seems not to be used by anyone in
Contiki source tree so we don't implement it.

This patch also creates the isr.h header file. All interrupt
service routine prototypes must be declared in this file. This
header should be included by the file which defines the main()
function, otherwise SoC ISRs will not be registered.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
cc2540: Add support for etimer

This patch adds support for etimer library. As recommended in Contiki
documentation, we implement the etimer hooking in the system clock.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
cc2540mini: Initial support for CC2540 mini development kit

This patch adds the initial files for supporting CC2540 mini
development kit from TI. Since clock module and etimer library
is already supported by the SoC, we initialize etimer and ctimer
processes, as well as autostart process.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
cc2540: rtimer module initial support

Since the SoC dependent file rtimer-arch.h is required to build
Contiki, we add the inital support for rtimer module. By now,
we use the system clock module to implement the rtimer module.
Nevertheless, the rtimer module will be properly support in future.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
cc2540: Add mtarch.h header

This patch adds the mtarch.h header which defines a dummy struct
mtarch_thread in order we are able to build Contiki for cc2540mini
platform.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
cc2540mini: Add LED support

This patch adds the LED support for cc2540mini platform. The
cc2540mini platform has only two LEDs (green and red).

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
cc2540: Change linker options

This patch changes the linker --xram-loc option so the start location
of the external RAM is 0x0001. This way we prevent the NULL address
to be used as a valid memory address.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
examples: Add blink example

This patch adds a simple blink example which inverts the green led
each second.

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>
Add cscope files to .gitignore

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Add cc2540mini build files to .gitignore

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>
FIXUP examples: Add blink example
cc2540mini: Add upload rule to Makefile

This patch adds "upload" rule to make easier to upload a new firmware
to cc2540mini using CC-Debugger hardware and cc-tool software.

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>
cc2540mini: Add README with general instructions

This patch adds a README file containing general instructions about
how to prepare the system to work with cc2540mini and how to build
applications targeting it.

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>
cc2540: Add bit defines for non bit-addressable SFRs

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>
cc2540mini: Add support for platform buttons

This patch implements support for cc2540mini B3 and B4 buttons using
Contiki sensors framework.

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>
cc2540mini: Add buttons example

This patch adds an example which handles with both buttons present
in the platform.

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>
dev: Add generic driver for buzzer

This patch adds generic support for buzzers through 3 APIs:

* void buzzer_init(void)
* void buzzer_start(unsigned int frequency)
* void buzzer_stop(void)

These APIs must be implemented by each platform.

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>
cc2540mini: Implement buzzer driver

This patch implements the platform specific functions of buzzer
driver.

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>
cc2540mini: Add buzzer example

Signed-off-by: Paulo Borges <paulo.borges@openbossa.org>