Platform/ECM3532/DSP/hw/csp/ecm3532/src/eta_csp_io.c
/***************************************************************************/
/**
 *
 *  eta_csp_printviam3_end_message - Ends the process of sending print to M3 via
 *                                   mailbox (i.e. cleanup and send mailbox)
 *
 ******************************************************************************/
Ends the process of sending print to M3 via
mailbox
Ends the process of sending print to M3 via mailbox
void
eta_csp_printviam3_end_message(void)
{
    etaPutc('\0');
    uint16_t mailbox_cmd;
    uint32_t mailbox_message;
    int byteaddress;
     byteaddress = globaddr + msgstart
     systemaddr = byteaddress[14:1],1'b0,byteaddress[0];
    byteaddress = ((int)&glob_printbuff_data[0]) + glob_printbuff_msgstart;
     This is byte aligned, 32 bit AHB address
    mailbox_message =
        DSP_PRINT_BUFFER_IN_YMEM ? DSP_YMEM_START : DSP_XMEM_START;
    mailbox_message |= ((byteaddress & ~0x1) << 1);
    mailbox_message |= ((byteaddress &  0x1));
    mailbox_cmd = MAILBOX_DSP2M3CMD_PRINTVIAM3;
     Let the m3 know we want to print something.
    EtaCspMboxDsp2M3(mailbox_cmd, mailbox_message);
    return;
}
void eta_csp_printviam3_end_message ( void ) { etaPutc ( ' \0 ' ) ; uint16_t mailbox_cmd ; uint32_t mailbox_message ; int byteaddress ; byteaddress = ( ( int ) & glob_printbuff_data [ 0 ] ) + glob_printbuff_msgstart ; mailbox_message = DSP_PRINT_BUFFER_IN_YMEM ? DSP_YMEM_START : DSP_XMEM_START ; mailbox_message |= ( ( byteaddress & ~ 0x1 ) << 1 ) ; mailbox_message |= ( ( byteaddress & 0x1 ) ) ; mailbox_cmd = MAILBOX_DSP2M3CMD_PRINTVIAM3 ; EtaCspMboxDsp2M3 ( mailbox_cmd , mailbox_message ) ; return ; }
eta_csp_printviam3_end_message - Ends the process of sending print to M3 via
                                   mailbox (i.e.
eta_csp_printviam3_end_message - Ends the process of sending print to M3 via mailbox ( i . e .
// We need to "print" end of string so we can deliminate commands // DSP byte address is confusing. // First things first, we need to find address of glob_printbuff_data which // will be in bytes. // Then we take the index, which is also in bytes. // But, to make it easier for M3, we'll tell the the system address. The DSP // expresses a 16 bit halfword // in a 32 bit system address space. So this means that when we specify the // starting address, we'll always have // and extra 0 inseted at bit position[1]. // // byteaddress = globaddr + msgstart // systemaddr = byteaddress[14:1],1'b0,byteaddress[0]; // This is byte aligned, 32 bit AHB address // Let the m3 know we want to print something.