TelosB GPIO interrupts in Contiki

378 views Asked by At

Does anyone has a simple example where it shows how external interrupts can be handle on TelosB using Contiki. For eg, when a button is pressed then the MSP430 micro-controller wakes up from the deep sleep mode, it does some stuffs and then switches back to deep sleep. Code snippet will be helpful.

1

There are 1 answers

0
kfx On

See platform/sky/dev/button-sensor.c for some example code that you can adapt.

It's possible that for your use case it's enough just to use the higher-level sensor API already provided by Contiki. There is a button_sensor object; see examples/sky/test-button.c for an example application.