Simplifies the pattern of an optional arg which can be a list of at
least a certain length, otherwise one is lazily initialised.
Modify pyb.CAN and ESP-NOW APIs to use the helper. Note this changes
the return type of pyb.CAN.recv() from tuple to list.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Currently only classic CAN, but tests run on both the stm32 classic CAN
controller and the FD-CAN controller with the same results.
Signed-off-by: Angus Gratton <angus@redyak.com.au>