-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Loopback Device #43
Conversation
audio/out/app.c
Outdated
/* Write to Endpoint 8 FIFO */ | ||
FIFOADD0 = 1; | ||
FIFOADD1 = 1; | ||
SYNCDELAY3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while (true) {
// Do stuff
....
// Send the data from EP8 out to FD
if (!(EP8CS & bmEPEMPTY)) {
// Read the length of the incoming buffer
uint16_t buflen = MAKEWORD(EP8BCH, EP8BCL);
for (uint16_t i = 0; i < buflen; i++) {
// Toggle clock low
CLK = 0;
// Write data
FD = EP8FIFOBUF[i];
// Sleep for a bit
SYNCDELAY;
SYNCDELAY;
SYNCDELAY;
SYNCDELAY;
// Toggle clock high
CLK = 1;
// Sleep for a bit
SYNCDELAY;
SYNCDELAY;
SYNCDELAY;
SYNCDELAY;
}
// SKIP the buffer as we don't want it forward to the output FIFO.
SKIP = 1;
}
// Do more stuff
....
}
audio/out/app.c
Outdated
usart_send_byte_hex(FD); | ||
} | ||
} | ||
/* Discard byte from the FIFO */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discard buffer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skip and don't commit to the FIFO
8674d05
to
17095c1
Compare
1c9179a
to
80b63d3
Compare
Uses 2 FX2 dev boards as a loopback device