Compare commits
No commits in common. "ab6954902aa54d410b06c0ddb31d8b86bc0b7559" and "6b86f5edf48185cf2b49c0b3cdcf947c7056a922" have entirely different histories.
ab6954902a
...
6b86f5edf4
|
|
@ -1 +0,0 @@
|
||||||
build
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
list(APPEND BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
|
|
||||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
|
||||||
project(firebeatle)
|
|
||||||
|
|
||||||
target_sources(app PRIVATE src/main.c)
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
# firebeatle
|
|
||||||
|
|
@ -5,5 +5,5 @@
|
||||||
|
|
||||||
config BOARD_FIREBEETLE2_ESP32C6
|
config BOARD_FIREBEETLE2_ESP32C6
|
||||||
select SOC_ESP32_C6_WROOM_1U_N4
|
select SOC_ESP32_C6_WROOM_1U_N4
|
||||||
select SOC_ESP32C6_HPCORE if BOARD_FIREBEETLE2_ESP32C6_ESP32C6_HPCORE
|
select SOC_ESP32C6_HPCORE if BOARD_ESP32C6_DEVKITC_ESP32C6_HPCORE
|
||||||
select SOC_ESP32C6_LPCORE if BOARD_FIREBEETLE2_ESP32C6_ESP32C6_LPCORE
|
select SOC_ESP32C6_LPCORE if BOARD_ESP32C6_DEVKITC_ESP32C6_LPCORE
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
board:
|
board:
|
||||||
name: firebeetle2_esp32c6
|
name: firebeetle2_esp32c6
|
||||||
|
full_name: FireBeetle 2 ESP32-C6
|
||||||
|
vendor: dfrobot
|
||||||
socs:
|
socs:
|
||||||
- name: esp32c6
|
- name: esp32c6
|
||||||
|
|
|
||||||
|
|
@ -25,18 +25,9 @@
|
||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
sw0 = &user_button1;
|
sw0 = &user_button1;
|
||||||
led0 = &green_led;
|
|
||||||
watchdog0 = &wdt0;
|
watchdog0 = &wdt0;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds: leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
green_led: led_0 {
|
|
||||||
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
|
||||||
label = "User LED1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
gpio_keys {
|
gpio_keys {
|
||||||
compatible = "gpio-keys";
|
compatible = "gpio-keys";
|
||||||
user_button1: button_1 {
|
user_button1: button_1 {
|
||||||
|
|
@ -80,10 +71,6 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb_serial {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&wifi {
|
&wifi {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
36
src/main.c
36
src/main.c
|
|
@ -1,36 +0,0 @@
|
||||||
#include <zephyr/kernel.h>
|
|
||||||
#include <zephyr/drivers/gpio.h>
|
|
||||||
|
|
||||||
#define LED0_NODE DT_ALIAS(led0)
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!gpio_is_ready_dt(&led)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
|
|
||||||
if (ret < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
printk("Hello World! %s\n", CONFIG_BOARD);
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
ret = gpio_pin_toggle_dt(&led);
|
|
||||||
if (ret < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
k_msleep(100);
|
|
||||||
|
|
||||||
ret = gpio_pin_toggle_dt(&led);
|
|
||||||
if (ret < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
k_msleep(300);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue