raspberrypi / pico-examples

BSD 3-Clause "New" or "Revised" License
2.62k stars 779 forks source link

slave_mem_i2c should memset context #409

Open blippy opened 11 months ago

blippy commented 11 months ago

In i2c/slave_mem_i2c/slave_mem_i2c.c, context struct should be zero'd in main(). The contents potentially might be stale (particularly context.mem_address_written after a warm reboot), putting the machine into an incorrect initial state.