Based on and tested on the rp2 port. Signed-off-by: Liao Jingyi <liaojingyi2@gmail> Signed-off-by: Damien George <damien@micropython.org>