Skip to content

Update SPI Device HAL to use new autogen interface#387

Open
ziuziakowska wants to merge 1 commit into
lowRISC:mainfrom
ziuziakowska:hal-autogen-rework-spi-device
Open

Update SPI Device HAL to use new autogen interface#387
ziuziakowska wants to merge 1 commit into
lowRISC:mainfrom
ziuziakowska:hal-autogen-rework-spi-device

Conversation

@ziuziakowska
Copy link
Copy Markdown
Contributor

Split off from #299.

@ziuziakowska ziuziakowska force-pushed the hal-autogen-rework-spi-device branch from 1755b42 to 2cfbaa7 Compare April 9, 2026 15:34
@ziuziakowska ziuziakowska force-pushed the hal-autogen-rework-spi-device branch 2 times, most recently from f45de2f to 8b85c97 Compare April 30, 2026 15:17
@ziuziakowska ziuziakowska changed the title [WIP] Update SPI Device HAL to use new autogen interface Update SPI Device HAL to use new autogen interface Apr 30, 2026
Signed-off-by: Alice Ziuziakowska <a.ziuziakowska@lowrisc.org>
@ziuziakowska ziuziakowska force-pushed the hal-autogen-rework-spi-device branch from 8b85c97 to 98fbdda Compare April 30, 2026 15:20
@ziuziakowska ziuziakowska marked this pull request as ready for review May 13, 2026 16:43
@ziuziakowska ziuziakowska requested a review from engdoreis May 13, 2026 16:44
Copy link
Copy Markdown
Collaborator

@engdoreis engdoreis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, I had a quick look and letf some comments.
I'm happy to give a more detailed review when it pass CI.

return true;
default:
uprintf(ctx->console, "\nUnsupported command: 0x%0x", cmd.opcode);
uprintf(ctx->console, "Unsupported command: 0x%x\n", cmd.opcode);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the line break?

#include <stdint.h>

bool spi_device_interrupt_is_pending(spi_device_t spi_device, uint8_t intr_id)
enum : size_t {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These structs should not be inside the spi hal, you should create a flash header somewhere, then the app should call the hal to configure the spi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants