rtc: Ensure next is initialized
rtc: Ensure time is valid before scheduling alarms
rtc: Set TAR before enabling interrupt
nrf: make sure we have the right int
Merge branch 'master' of github.com:mchck/mchck
rtc: Fix rtc_alarm_cancel

Previously the head wasn't considered.
spiflash: Use enum values instead of magic numbers
spi: Add queued flag to spi_ctx_bare

This allows us to ensure that the queue never forms a cycle, e.g. when
the same context is used for multiple transactions. These issues are
very difficult to debug and therefore the small cost of this measure
should be well worthwhile.
Merge pull request #96 from bgamari/master

Various fixes for RTC and SPI
toolchain: add I2C library with queueing

Code written by myself and Derek Mulcahy.
examples: add i2c scanner example

Code originally by Derek Mulcahy, ported to the queueing I2C infrastructure by myself.
toolchain: implemented corecode's i2c recommendations, fixed bugs

* Removed references to the glitch filter
* Changed the callback invocation
* Got rid of the i2c.h macros; too intransparent (and would break in
    loops)
* Replaced 'UNUSED' dummy read with a void cast, inspection of the
    generated assembly verifies that it does the right thing
* Created enum for read/write, clearer that way
* Invoke callback after everything else is done
* Removed a debug statement that I missed
* Little bit more code deduplication
* Misc style changes
spiflash: Add spiflash_set_protection

Some SPI FLASH devices start with block protection set.
spiflash: Remove capacity_to_bytes

Unfortunately this isn't nearly as standardized as I was hoping. In
fact, not all devices even seem to report capacity in READ_ID.
lib/adc: mark adc status volatile

Seems LTO is smart enough to deduce that the status does never
change (because it only does from interrupt context).

Reported-by: stg
toolchain/ld: separate K20 peripheral map into single include

This data was the same in four different files, so I put it in one and
included that in them.
Merge branch 'master' of https://github.com/mchck/mchck
Re-add LLWU and SMC to linker K20 script

It seems these were dropped in the recent refactoring
Merge pull request #98 from bgamari/master

spiflash: Add spiflash_set_protection
spi: Add spi_is_idle

This allows us to safely determine when it's safe to sleep the core