Add examples making use of the RTC

Add an example using the RTC to help with a lower power design.  This is
a sister example to the existing "button-irq-printf", which is
functionally identical, but uses far less power.

There's more tricks that can be done to lower the power even further,
but this shows a few of the early steps that can be done, using the RTC
wakeup instead of a timer.
This commit is contained in:
Karl Palsson
2013-01-23 00:01:46 +00:00
parent e5b3250382
commit d9fb4f7401
11 changed files with 508 additions and 17 deletions

View File

@@ -24,8 +24,8 @@
extern "C" {
#endif
#include <libopencm3/stm32/l1/gpio.h>
#include <libopencm3/stm32/l1/nvic.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/exti.h>
#include <libopencm3/stm32/usart.h>
@@ -46,6 +46,7 @@ extern "C" {
struct state_t {
bool falling;
int tickcount;
};