Skip to content

Commit 6073200

Browse files
zdtyuiop4444Rbb666
authored andcommitted
[bsp][cvitek] fix spi driver build error
Build error: 'struct _device_spi' has no member named 'base_addr' Analyze: the name should be dws.regs Solution: change base_addr to dws.regs Signed-off-by: zdtyuiop4444 <[email protected]>
1 parent f02d3cc commit 6073200

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bsp/cvitek/drivers/drv_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ int rt_hw_spi_init(void)
335335

336336
for (rt_size_t i = 0; i < sizeof(_spi_obj) / sizeof(struct _device_spi); i++)
337337
{
338-
_spi_obj[i].base_addr = (rt_ubase_t)DRV_IOREMAP((void *)_spi_obj[i].base_addr, 0x1000);
338+
_spi_obj[i].dws.regs = (rt_ubase_t)DRV_IOREMAP((void *)_spi_obj[i].dws.regs, 0x1000);
339339

340340
_spi_obj[i].spi_bus.parent.user_data = (void *)&_spi_obj[i];
341341
ret = rt_spi_bus_register(&_spi_obj[i].spi_bus, _spi_obj[i].device_name, &_spi_ops);

0 commit comments

Comments
 (0)