Open bgould opened 10 months ago
Upon further investigation ... it appears machine.Serialer
is protected by build tags in src/machine/usb.go
... so maybe isn't intended for UART to implement it? Unless there is some detail I'm missing, I think that UART should implement machine.Serialer
.
The machine.Serialer interface, if I recall correctly, was introduced for the purpose of tidying up implementations such as -serial=uart. Therefore, it probably does not take into account environments without USB support.
As you are writing, I believe UART should implement machine.Serialer.
This function procedure is incompatible with the
machine.Serialer
interface:https://github.com/tinygo-org/tinygo/blob/2b215955cac75b1308d02269b8ea5b73448708a9/src/machine/machine_nrf.go#L174
When compiling with
-serial=uart
, compilation fails when attempting to usemachine.Serial
as amachine.Serialer
like: