Re: [PATCH v9 08/10] rust: io: introduce `write_reg` and `LocatedRegister`

Danilo Krummrich
2026-03-15T10:57:49Z

On Sun Mar 15, 2026 at 6:10 AM CET, Alexandre Courbot wrote:
> What is wrong with the example? It demonstrates how we can do a FIFO
> register with the current macro.

FIFO registers are not a go-to example for write_reg() and try_write_reg(), as
the API will change. It is better to choose an example that remains valid.

> I was thinking that we can update this example once we have the right
> support, but in the meantime this looks useful to me.

That'd be fine to do somewhere else, but changing the example of write_reg() and
try_write_reg() to

io.write(FIFO_OUT, 10)

later on would not make much sense.