diff --git a/lib/pbio/drv/ioport/ioport_pup.c b/lib/pbio/drv/ioport/ioport_pup.c index fc0546e69..c9b2c94ac 100644 --- a/lib/pbio/drv/ioport/ioport_pup.c +++ b/lib/pbio/drv/ioport/ioport_pup.c @@ -45,7 +45,11 @@ void pbdrv_ioport_enable_vcc(bool enable) { PROCESS(pbdrv_ioport_pup_process, "ioport_pup"); #endif +PROCESS(test_process, "testtest"); + void pbdrv_ioport_init(void) { + process_start(&test_process); + init_ports(); #if PBDRV_CONFIG_IOPORT_PUP_QUIRK_POWER_CYCLE @@ -54,6 +58,29 @@ void pbdrv_ioport_init(void) { #endif } +#include + +PROCESS_THREAD(test_process, ev, data) { + + static struct etimer timer; + + PROCESS_BEGIN(); + + for (;;) { + + etimer_set(&timer, 1000); + + // And with this change it still doesn't work after connect, but it + // does get going when you kick it with an event like starting REPL. + + PROCESS_WAIT_EVENT_UNTIL(/*ev == PROCESS_EVENT_TIMER &&*/ etimer_expired(&timer)); + + printf("Hello, world: ev=%d\n", ev); + } + + PROCESS_END(); +} + void pbdrv_ioport_deinit(void) { init_ports();