Apologies for boring everyone but I am testing out ideas and this is the best
place to try:
I have this code:
static void dc_microphone_callback(struct maple_driver_data *data)
{
struct mapleq *mq=& data->mq;
struct dc_microphone *mic = data->private_data;
/* Have we got data */
/* length = mq->length; */
int x = 0;
unsigned char *buf = mq->recvbuf;
/* memcpy(mic->snd, mq->buf, length*2); */
//char* buf = (char *)((mq->recvbuf) + 4);
printk("Maple reply (%d, %d) cmd=%d => %d\n", mq->port, mq->unit,
mq->command, mq->recvbuf[0]);
for (x = 0; x < 20; x++) printk("%i,",mq->recvbuf[x]);
printk(" ");
}
Generally speaking the Maple reply string is:
"Maple reply (1, 1) cmd=9 => -3"
Which I take to mean that the microphone just doesn't understand the "Get
condition" command (ie returns -3 meaning "Unknown command").
The first four values of recvbuf are -3, 64, 65, 0. Meaning (I think):
Unknown command reposnse sent to Port B from subperipherial 1 on Port B, no
further words in frame: all of which makes sense. (Stop me if I am going
wrong here!)
But this leaves me with a problem - viz: if it doesn't send data in response
to this command what does it send it in response to?!
Adrian
|