@@ -43,7 +43,7 @@ static void ioexpander_bus_send(dotclockframebuffer_ioexpander_spi_bus *bus,
4343// * CPOL=CPHA=0
4444// * CS deasserted after each init sequence step, but not otherwise just like
4545// displayio fourwire bus without data_as_commands
46- void dotclockframebuffer_ioexpander_send_init_sequence (dotclockframebuffer_ioexpander_spi_bus * bus , uint8_t * init_sequence , uint16_t init_sequence_len ) {
46+ void dotclockframebuffer_ioexpander_send_init_sequence (dotclockframebuffer_ioexpander_spi_bus * bus , const uint8_t * init_sequence , uint16_t init_sequence_len ) {
4747 while (!common_hal_busio_i2c_try_lock (bus -> bus )) {
4848 RUN_BACKGROUND_TASKS ;
4949 }
@@ -52,11 +52,11 @@ void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexp
5252 pin_change (bus , /* set */ bus -> cs_mask , /* clear */ bus -> clk_mask );
5353
5454 for (uint32_t i = 0 ; i < init_sequence_len ; /* NO INCREMENT */ ) {
55- uint8_t * cmd = init_sequence + i ;
55+ const uint8_t * cmd = init_sequence + i ;
5656 uint8_t data_size = * (cmd + 1 );
5757 bool delay = (data_size & DELAY ) != 0 ;
5858 data_size &= ~DELAY ;
59- uint8_t * data = cmd + 2 ;
59+ const uint8_t * data = cmd + 2 ;
6060
6161 ioexpander_bus_send (bus , true, cmd , 1 );
6262 ioexpander_bus_send (bus , false, data , data_size );
0 commit comments