Automatically add code to main.c
All checks were successful
Build & Publish / build (push) Successful in 10m5s
All checks were successful
Build & Publish / build (push) Successful in 10m5s
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
|
||||
|
||||
/* --------------------------- */
|
||||
/* Buttons */
|
||||
/* --------------------------- */
|
||||
|
||||
/* Imports / Declarations */
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/drivers/gpio.h>
|
||||
#include <zephyr/sys/util.h>
|
||||
@@ -25,6 +32,7 @@ static struct gpio_dt_spec led = GPIO_DT_SPEC_GET_OR(DT_ALIAS(led0), gpios,
|
||||
{0});
|
||||
|
||||
|
||||
/* Functions */
|
||||
void button_pressed(const struct device *dev, struct gpio_callback *cb,
|
||||
uint32_t pins)
|
||||
{
|
||||
|
1
snippets/button/config.txt
Normal file
1
snippets/button/config.txt
Normal file
@@ -0,0 +1 @@
|
||||
CONFIG_GPIO=y
|
Reference in New Issue
Block a user