/*
 * Copyright 2021 MindMotion Microelectronics Co., Ltd.
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <stdint.h>
#include <stdio.h>

#include "board_init.h"

/*
 * Definitions.
 */

/*
 * Variables.
 */


/*
 * Declerations.
 */

/*
 * Functions.
 */

int main(void)
{
    BOARD_Init();

	printf("\r\nmds_trigger_basic example.\r\n");
    printf("press any key to start.\r\n");

    while (1)
    {
        /* type any key into the terminal to trigger the conversion. */
        getchar();

        /* configure the trigger mode. */
	    MDS_EnableTrigger(BOARD_MDS_PORT, TRIGGER_OUT, TRIGGER_IN_0, MDS_TriggerInMode_RisingEdge); 
        /* when using the software as the trigger in, setup this api. */
        MDS_DoSwTrigger(BOARD_MDS_PORT);
        /* wait for trigger target. */
        BOARD_WaitTrigger();				
        printf("mds_trigger_basic done.\r\n");
    }
}

/* EOF. */
