Conversation
|
Blocking on:
|
|
Nice-to-haves:
|
|
In the driver, config.slice_size is set manually; I will update sdfgen to populate this automatically EDIT: done |
|
@ABIbreak does this need to be based on Lesley's I2C branch? For review it would be easier if it was just the SPI changes. |
|
No, I'll rebase off of main |
|
examples/spi/{Makefile, build.zig, build.zig.zon} were directly copied from the examples/i2c/, I will edit them later |
| } | ||
|
|
||
| LOG_DRIVER_ERR("Polling RX timed out\n"); | ||
| return -1; |
There was a problem hiding this comment.
Should probably use numbered error codes (ETIMEOUT? idk); instead of int returns.
There was a problem hiding this comment.
Should probably use numbered error codes (ETIMEOUT? idk); instead of
intreturns.
This is used internally and there's only one error case in this function, so I don't think this is necessary. We don't have a standard way of going about this though .... probably something we should write into the engineering docs 😳
| } | ||
|
|
||
| if (poll_rx()) { | ||
| return -1; |
There was a problem hiding this comment.
as above re: error codes.
drivers/spi/opentitan/driver.h
Outdated
| uint16_t num_cmds; | ||
| void *slice_base; | ||
| // Request in-progress state | ||
| uint8_t cmd_in_progress; |
There was a problem hiding this comment.
If this is an index, is it intended that the cmd_in_progress is a smalelr type than num_cmds?
| } | ||
|
|
||
| LOG_DRIVER_ERR("Polling RX timed out\n"); | ||
| return -1; |
There was a problem hiding this comment.
Should probably use numbered error codes (ETIMEOUT? idk); instead of
intreturns.
This is used internally and there's only one error case in this function, so I don't think this is necessary. We don't have a standard way of going about this though .... probably something we should write into the engineering docs 😳
2d3716f to
915d406
Compare
Signed-off-by: George Chen <george.j.chen@student.unsw.edu.au>
Signed-off-by: George Chen <george.j.chen@student.unsw.edu.au>
This PR will add support for SPI to sddf in terms of the following deliverables: