1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-27 17:05:20 +02:00

ubb-la/ubb-la.c (xfers): wait for END_CMD_RES instead of DATA_FIFO_EMPTY

This seems to make no difference for the gap but the "start bit" (DAT0
pulled low) seem to get 1-2 samples shorter:

1       3       gap     2       0       1       3
------- ------- ------- ------- ------- ------- -------
146             77      9                       60
147     13      79      9                       45
145     28      79      10                      29
146     43      79      9                       15
This commit is contained in:
Werner Almesberger 2013-01-27 18:38:23 -03:00
parent 4ffd61093b
commit 18a822b845

View File

@ -192,7 +192,8 @@ static void xfers(unsigned long *bufs, int n_bufs, int nibbles)
while (1) { while (1) {
MSC_STRPCL = MSC_STRPCRL_START_OP; MSC_STRPCL = MSC_STRPCRL_START_OP;
while (MSC_STAT & MSC_STAT_DATA_FIFO_EMPTY); // while (MSC_STAT & MSC_STAT_DATA_FIFO_EMPTY);
while (!(MSC_STAT & MSC_STAT_END_CMD_RES));
IN(UBB_CMD); IN(UBB_CMD);