Esempio n. 1
0
        private void checkFallingEdge_CheckedChanged(object sender, System.EventArgs e)
        {
            int nModuleCount = 0;

            CAXD.AxdInfoGetModuleCount(ref nModuleCount);

            if (nModuleCount > 0)
            {
                int  nBoardNo   = 0;
                int  nModulePos = 0;
                uint uModuleID  = 0;

                CAXD.AxdInfoGetModule(comboModule.SelectedIndex, ref nBoardNo, ref nModulePos, ref uModuleID);

                switch ((AXT_MODULE)uModuleID)
                {
                case AXT_MODULE.AXT_SIO_DI32:
                    if (checkFallingEdge.Checked)
                    {
                        CAXD.AxdiInterruptEdgeSetWord(comboModule.SelectedIndex, 0, (uint)AXT_DIO_EDGE.DOWN_EDGE, 0xFFFF);
                        CAXD.AxdiInterruptEdgeSetWord(comboModule.SelectedIndex, 1, (uint)AXT_DIO_EDGE.DOWN_EDGE, 0xFFFF);
                    }
                    else
                    {
                        CAXD.AxdiInterruptEdgeSetWord(comboModule.SelectedIndex, 0, (uint)AXT_DIO_EDGE.DOWN_EDGE, 0x0000);
                        CAXD.AxdiInterruptEdgeSetWord(comboModule.SelectedIndex, 1, (uint)AXT_DIO_EDGE.DOWN_EDGE, 0x0000);
                    }
                    break;

                case AXT_MODULE.AXT_SIO_DB32P:
                case AXT_MODULE.AXT_SIO_DB32T:
                    if (checkFallingEdge.Checked)
                    {
                        CAXD.AxdiInterruptEdgeSetWord(comboModule.SelectedIndex, 0, (uint)AXT_DIO_EDGE.DOWN_EDGE, 0xFFFF);
                    }
                    else
                    {
                        CAXD.AxdiInterruptEdgeSetWord(comboModule.SelectedIndex, 0, (uint)AXT_DIO_EDGE.DOWN_EDGE, 0x0000);
                    }
                    break;
                }
            }
        }