Skip to content

Commit

Permalink
add power mos pins
Browse files Browse the repository at this point in the history
  • Loading branch information
limengdu committed Dec 18, 2023
1 parent a6d2528 commit 8a042ed
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions components/seeed_mr24hpc1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import pins
import esphome.config_validation as cv
from esphome.components import uart
from esphome.const import CONF_ID
from esphome.automation import maybe_simple_id
Expand All @@ -26,18 +26,14 @@
CONFIG_SCHEMA = cv.Schema(
{
cv.GenerateID(): cv.declare_id(MR24HPC1Component),
cv.Required(CONF_MOS_PIN): pins.gpio_output_pin_schema,
}
)

# This code extends the current CONFIG_SCHEMA by adding all the configuration parameters for the UART device and components.
# This means that in the YAML configuration file, the user can use these parameters to configure this component.
CONFIG_SCHEMA = cv.All(
CONFIG_SCHEMA.extend(uart.UART_DEVICE_SCHEMA).extend(cv.COMPONENT_SCHEMA)
.extend(
{
cv.Required(CONF_MOS_PIN): pins.gpio_input_pin_schema,
}
)
)

# A verification mode was created to verify the configuration parameters of a UART device named "seeed_mr24hpc1".
Expand Down

0 comments on commit 8a042ed

Please sign in to comment.