mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-21 17:35:06 +00:00
Fix for test and devicetree compiler
This commit is contained in:
parent
65ea551990
commit
8f55942f3e
@ -20,8 +20,10 @@ def write_define(file, define: DefineC, verbose: bool):
|
|||||||
def get_device_node_name_safe(device: Device):
|
def get_device_node_name_safe(device: Device):
|
||||||
if device.node_name == "/":
|
if device.node_name == "/":
|
||||||
return "root"
|
return "root"
|
||||||
else:
|
name = device.node_name.replace("-", "_")
|
||||||
return device.node_name.replace("-", "_")
|
if device.node_address is not None:
|
||||||
|
name += "_" + device.node_address.replace("-", "_")
|
||||||
|
return name
|
||||||
|
|
||||||
def get_device_type_name(device: Device, bindings: list[Binding]):
|
def get_device_type_name(device: Device, bindings: list[Binding]):
|
||||||
device_binding = find_device_binding(device, bindings)
|
device_binding = find_device_binding(device, bindings)
|
||||||
|
|||||||
@ -10,6 +10,7 @@ static const root_config_dt root_config = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct Device root = {
|
static struct Device root = {
|
||||||
|
.address = 0,
|
||||||
.name = "/",
|
.name = "/",
|
||||||
.config = &root_config,
|
.config = &root_config,
|
||||||
.parent = NULL,
|
.parent = NULL,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user