Platform/ECM3532/DSP/hw/csp/ecm3532/src/eta_csp_io.c
/***************************************************************************/
/**
 *
 *  EtaCspIoMboxPrintInit - If enabled, will initialize DSP Print
 *                                    buffer used by PRINT_VIA_M3_MBOX
 *
 ******************************************************************************/
If enabled, will initialize DSP Print
buffer used by PRINT_VIA_M3_MBOX
If enabled will initialize DSP Print buffer used by PRINT_VIA_M3_MBOX
void
EtaCspIoMboxPrintInit(void)
{
    uint16_t byteaddress;
    uint32_t mailbox_message;
    glob_printbuff_wrptr = 0;
    glob_printbuff_rdptr = 0;
    byteaddress = ((uint16_t)&glob_printbuff_data[0]);
    mailbox_message =
        DSP_PRINT_BUFFER_IN_YMEM ? DSP_YMEM_START : DSP_XMEM_START;
    mailbox_message |= ((byteaddress & ~0x1) << 1);
    mailbox_message |= ((byteaddress &  0x1));
    glob_printbuff_data [DSP_PRINT_BUFFER_SIZE - 1] = (mailbox_message >> 0) &
                                                      0xff;
    glob_printbuff_data [DSP_PRINT_BUFFER_SIZE - 2] = (mailbox_message >> 8) &
                                                      0xff;
    glob_printbuff_data [DSP_PRINT_BUFFER_SIZE - 3] = (mailbox_message >> 16) &
                                                      0xff;
    glob_printbuff_data [DSP_PRINT_BUFFER_SIZE - 4] = (mailbox_message >> 24) &
                                                      0xff;
    glob_printbuff_data [DSP_PRINT_BUFFER_SIZE - 5] = MAILBOX_DSP2M3CMD_PWRAP;
}
void EtaCspIoMboxPrintInit ( void ) { uint16_t byteaddress ; uint32_t mailbox_message ; glob_printbuff_wrptr = 0 ; glob_printbuff_rdptr = 0 ; byteaddress = ( ( uint16_t ) & glob_printbuff_data [ 0 ] ) ; mailbox_message = DSP_PRINT_BUFFER_IN_YMEM ? DSP_YMEM_START : DSP_XMEM_START ; mailbox_message |= ( ( byteaddress & ~ 0x1 ) << 1 ) ; mailbox_message |= ( ( byteaddress & 0x1 ) ) ; glob_printbuff_data [ DSP_PRINT_BUFFER_SIZE - 1 ] = ( mailbox_message >> 0 ) & 0xff ; glob_printbuff_data [ DSP_PRINT_BUFFER_SIZE - 2 ] = ( mailbox_message >> 8 ) & 0xff ; glob_printbuff_data [ DSP_PRINT_BUFFER_SIZE - 3 ] = ( mailbox_message >> 16 ) & 0xff ; glob_printbuff_data [ DSP_PRINT_BUFFER_SIZE - 4 ] = ( mailbox_message >> 24 ) & 0xff ; glob_printbuff_data [ DSP_PRINT_BUFFER_SIZE - 5 ] = MAILBOX_DSP2M3CMD_PWRAP ; }
EtaCspIoMboxPrintInit - If enabled, will initialize DSP Print
                                    buffer used by PRINT_VIA_M3_MBOX
EtaCspIoMboxPrintInit - If enabled will initialize DSP Print buffer used by PRINT_VIA_M3_MBOX
// This is byte aligned, 32 bit AHB address