Skip to content

Commit b1fac71

Browse files
authored
Merge pull request platformio#2 from eerimoq/develop
Updated the Simba blink example to Simba 4.1.0.
2 parents 1600347 + 97b6b33 commit b1fac71

File tree

1 file changed

+8
-7
lines changed
  • examples/simba-blink/src

1 file changed

+8
-7
lines changed

examples/simba-blink/src/main.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @file main.c
3-
* @version 1.0
3+
* @version 4.1.0
44
*
55
* @section License
66
* Copyright (C) 2015-2016, Erik Moqvist
@@ -24,16 +24,17 @@ int main()
2424
{
2525
struct pin_driver_t led;
2626

27-
/* Start the kernel. */
27+
/* Start the system. */
2828
sys_start();
2929

30-
/* Initialize the LED pin as output. */
30+
/* Initialize the LED pin as output and set its value to 1. */
3131
pin_init(&led, &pin_led_dev, PIN_OUTPUT);
32-
32+
pin_write(&led, 1);
33+
3334
while (1) {
34-
/* Wait for a seconds. */
35-
thrd_usleep(1000000);
36-
35+
/* Wait half a second. */
36+
thrd_sleep_us(500000);
37+
3738
/* Toggle the LED on/off. */
3839
pin_toggle(&led);
3940
}

0 commit comments

Comments
 (0)