#include  "windef.h"
#include  "mbdr_dsp_utils.h"


#include  "mbdr_dsp_xpci_hw_utils.h"
#include  "mbdr_dsp_xpci_manage_utils.h"
#include  "dsp_get_core_index_app.h"
#include  "dsp_qdma_link_driver.h"
#include  "dsp_gpio.h"
#include  "dsp_leds.h"
#include  "dsp_qdma_link_driver_control.h"

dsp_qdma_link_driver_control_t dsp_qdma_link_driver_control_kuku;

void mbdr_dsp_check_peripherls_link_only(void)
{/* mbdr_dsp_check_peripherls_link_only */

	LONG dummy;
	const LONG dummy_const=8;

	/* mbdr_dsp_xpci_hw_utils.h  */
	mbdr_dsp_xpci_hw_utils_memcpy_write(
	                         8,        /* LONG    po_dst_external_buf_bofs,          */
	                         &dummy,   /* void   *pi_dsp_src_buf_p,                  */
	                         17,        /* size_t  pi_byte_size,                      */
	                         9        /* LONG    pi_mbdr_dsp_xpci_utils_base_tbl_index */);
	mbdr_dsp_xpci_hw_utils_memcpy_write_no_base(
			                 &dummy,         /* *po_dst_external_buf_xpci_p, */
	                         &dummy_const,  /* *pi_dsp_src_buf_p, */
	                         54675          /*  pi_byte_size */);
	mbdr_dsp_xpci_hw_utils_memcpy_read(
			&dummy,       /* void   *po_dsp_dst_buf_p, */
	        3,            /* LONG    pi_src_external_buf_bofs, */
	        4,            /* size_t  pi_byte_size, */
	        4             /* LONG    pi_mbdr_dsp_xpci_utils_base_tbl_index */);
	 mbdr_dsp_xpci_hw_utils_memcpy_read_no_base(
	       &dummy,        /* void         *po_dsp_dst_buf_p, */
	       &dummy_const,  /* const  void  *pi_src_external_buf_xpci_p, */
	       4              /* size_t        pi_byte_size */);



	 dsp_qdma_link_driver_config(
			 &dummy,      /* LONG  *pio_temporary_buffer_p,*/
	         2,           /* LONG  pi_temporary_buffer_byte_size,*/
	         6,           /* SHORT pi_channel_number,      */
	         8,           /*  SHORT pi_first_param_index,*/
	         9,           /*  SHORT pi_param_entries,    */
	         &dsp_qdma_link_driver_control_kuku /* dsp_qdma_link_driver_control_t    *pio_dsp_qdma_link_driver_control_p*/);
	 dsp_qdma_link_driver_link_next_message(
			 &dummy,                         /*LONG *pi_data_buffer_p, */
	         4,                             /*SHORT  pi_data_baffer_byte_size, */
	         &dsp_qdma_link_driver_control_kuku);/* dsp_qdma_link_driver_control_t */
	 dummy =  dsp_qdma_get_free_memory_byte_size(&dsp_qdma_link_driver_control_kuku);
	 dsp_qdma_link_driver_send_list(&dsp_qdma_link_driver_control_kuku);
	 dsp_qdma_link_driver_flush(&dsp_qdma_link_driver_control_kuku);





}/* mbdr_dsp_check_peripherls_link_only */
