remove tmp files

This commit is contained in:
Tomasz Duda 2024-02-02 01:04:08 +01:00
parent 3c33c9e128
commit 8b7c9ea188
3 changed files with 0 additions and 62 deletions

View File

@ -1,31 +0,0 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.const import (
CONF_ID,
)
from esphome.components.nrf52 import add_zephyr_prj_conf_option
shell_ns = cg.esphome_ns.namespace("shell")
Shell = shell_ns.class_("Shell", cg.Component)
CONFIG_SCHEMA = cv.All(
cv.Schema(
{
cv.GenerateID(): cv.declare_id(Shell),
}
).extend(cv.COMPONENT_SCHEMA),
cv.only_with_zephyr,
)
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config)
add_zephyr_prj_conf_option("CONFIG_SHELL", True)
add_zephyr_prj_conf_option("CONFIG_SHELL_BACKENDS", True)
add_zephyr_prj_conf_option("CONFIG_SHELL_BACKEND_SERIAL", True)
add_zephyr_prj_conf_option("CONFIG_NET_SHELL_DYN_CMD_COMPLETION", True)
add_zephyr_prj_conf_option("CONFIG_NET_SHELL", True)
add_zephyr_prj_conf_option("CONFIG_GPIO_SHELL", True)
# add_zephyr_prj_conf_option("CONFIG_ADC_SHELL", True)
add_zephyr_prj_conf_option("CONFIG_NET_L2_BT_SHELL", True)

View File

@ -1,21 +0,0 @@
#include "shell.h"
#include <zephyr/usb/usb_device.h>
struct device;
namespace esphome {
namespace shell {
void Shell::setup() {
#if DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_shell_uart), zephyr_cdc_acm_uart)
const device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart));
if (!device_is_ready(dev) || usb_enable(NULL)) {
return;
}
#else
#error "shell is not set in device tree"
#endif
}
} // namespace shell
} // namespace esphome

View File

@ -1,10 +0,0 @@
#pragma once
#include "esphome/core/component.h"
namespace esphome {
namespace shell {
class Shell : public Component {
void setup() override;
};
}
}