add USE_SPI define (#5500)

This commit is contained in:
Angel Nunez Mencias 2023-10-08 23:01:26 +02:00 committed by GitHub
parent 7e7c83b3ca
commit aba3cd557a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -272,6 +272,7 @@ CONFIG_SCHEMA = cv.All(
@coroutine_with_priority(1.0) @coroutine_with_priority(1.0)
async def to_code(configs): async def to_code(configs):
cg.add_define("USE_SPI")
cg.add_global(spi_ns.using) cg.add_global(spi_ns.using)
for spi in configs: for spi in configs:
var = cg.new_Pvariable(spi[CONF_ID]) var = cg.new_Pvariable(spi[CONF_ID])