|
Use of Mailboxes |
Top Previous Next |
|
The HSC claims mailbox 1. The DSP send a mailbox value to the host to request some action; the Host eventually sends a mailbox value back as a reply to the DSP. Each 32-bit value is interpreted as follows:
typedef struct { unsigned int Data : 25; // data value unsigned int Fn : 4; // function code unsigned int Channel : 3; // channel selector } HSC_WORD;
#define HscChannel(v) (*(HSC_WORD *)&(v)).Channel #define HscFn(v) (*(HSC_WORD *)&(v)).Fn #define HscData(v) (*(HSC_WORD *)&(v)).Data
|