Move a debug printf beyond the chip select boundary to
allow for more accurate timing.
Send four bytes instead of just one.
Signed-off-by: Keith Packard <keithp@keithp.com>
for (i = 0; i < 10; i++) {
ao_spi_get(0);
stm_gpio_set(&stm_gpioc, 12, 0);
for (i = 0; i < 10; i++) {
ao_spi_get(0);
stm_gpio_set(&stm_gpioc, 12, 0);
- ao_spi_send(data, 1, 0);
+ ao_spi_send(data, 4, 0);
stm_gpio_set(&stm_gpioc, 12, 1);
ao_spi_put(0);
printf(".");
stm_gpio_set(&stm_gpioc, 12, 1);
ao_spi_put(0);
printf(".");
ao_spi_get(0);
stm_gpio_set(&stm_gpioc, 12, 0);
ao_spi_recv(data, 4, 0);
ao_spi_get(0);
stm_gpio_set(&stm_gpioc, 12, 0);
ao_spi_recv(data, 4, 0);
- printf(".");
- flush();
stm_gpio_set(&stm_gpioc, 12, 1);
ao_spi_put(0);
stm_gpio_set(&stm_gpioc, 12, 1);
ao_spi_put(0);
+ printf(".");
+ flush();