contiki-os/contiki — pull request #704 by bradjc (2014-06-09 01:11:56+00:00)
Title: CC2538: Creating a base CC2538 platform

The better the Contiki support for the CC2538 gets, the more CC2538 based hardware platforms that will be created. Right now, this is a bit tricky as one must copy the cc2538dk platform and make a few changes for the
difference in hardware and then compile against the cpu/cc2538 folder. This works until the cpu/cc2538 changes at which point platform/cc2538dk gets updated but not the platforms sitting in other repositories and compilation fails.

Because the changes to the cc2538dk platform to create a new platform are usually small (typically initializing different hardware), we can create a "base" cc2538 platform and build specific hardware platforms off of that. This commit does just that. It spins most of the cc2538dk platform into just a "cc2538" platform and uses the cc2538dk platform for the /dev folder code and a couple of `init()` functions.

`contiki-main.c` now calls two new functions

- `platform_init()`
- `platform_process_init()`

in the `main()` function. The first `platform_init()` function calls any platform specific hardware functions that need to be initalized (like the smartrf06 buttons). The `platform_process_init()` is there to start and platform specific processes (like the sensors process). Both init functions are defined in `platform.c`.

This commit also adds a `platform-conf.h` file that can be used to override any of the defaults in `contiki-conf.h`.

Finally, this commit adds support for disabling the LEDs during boot.