How to convert the addresses and values of switch ports given in document 1704 into an array and write them into registers via SPI?