When not compiling bootloader, a spinlock will be used for reading or writing I2C internal devices/registers. When compiling for bootloader, no need to use any lock.