Make examples friendlier for non GCC compilers and fixed slave_mem_i2c.c to compile on boards without I2C pins (#336)

This commit is contained in:
Graham Sanderson
2023-03-10 15:41:40 -06:00
committed by GitHub
parent 9d3fea1419
commit 60829a134a
39 changed files with 89 additions and 86 deletions

View File

@@ -37,8 +37,10 @@ int main() {
// on transfer size and address LSBs
printf("\nReading back 1 byte at a time\n");
// Little-endian!
printf("Should be ef be ad de: %02x %02x %02x %02x\n",
scratch8[0], scratch8[1], scratch8[2], scratch8[3]);
printf("Should be ef be ad de: %02x ", scratch8[0]);
printf("%02x ", scratch8[1]);
printf("%02x ", scratch8[2]);
printf("%02x\n", scratch8[3]);
// The Cortex-M0+ and the RP2040 DMA replicate byte writes across the bus,
// and IO registers will sample the entire write bus always.