led blink example
* led blink example * restore tests * Update FURI_and_examples.md
This commit is contained in:
16
applications/examples/blink.c
Normal file
16
applications/examples/blink.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "flipper.h"
|
||||
|
||||
void application_blink(void* p) {
|
||||
// create pin
|
||||
GpioPin led = {.pin = GPIO_PIN_8, .port = GPIOA};
|
||||
|
||||
// configure pin
|
||||
pinMode(led, GpioModeOutput);
|
||||
|
||||
while(1) {
|
||||
digitalWrite(led, HIGH);
|
||||
delay(500);
|
||||
digitalWrite(led, LOW);
|
||||
delay(500);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user