This is probably a dumb question but I need some help : I'm trying to simply blink an LED on my STM32L073 board. The LED is connected to the PB6 pin here's my code :
#include <zephyr.h>
#include <device.h>
#include <devicetree.h>
#include <drivers/gpio.h>
void main(void)
{
const struct device *dev;
dev = device_get_binding("GPIOB");
gpio_pin_configure(dev,6,GPIO_OUTPUT);
while(1){
gpio_pin_set(dev,6,1);
k_msleep(1000);
gpio_pin_set(dev,6,0);
k_msleep(1000);
}
}
I'm using platformio with Zephyr RTOS framework
In prj.conf I do have :
CONFIG_GPIO=y
In zephyr.dts, for gpiob the label is well GPIOB so I don't understand what is wrong here, so if anyone can help me it would be great :)