[Asterisk-Users] TDM400P FXS polarity reversal?

Soren Rathje asterisk at lolle.org
Mon Dec 13 01:10:50 MST 2004


Something like this.. :-)

    
    reg72 = wctdm_getreg(wc, card, 72);

    /* Negative Voltage */
    if (reg72 >> 6) {
        wctdm_setreg(wc, card, 72 , reg72 ^ 0x40);
        wait_just_a_bit(HZ/10);
        wctdm_setreg(wc, card, 72 , reg72 & 0x3F);
        }

    /* Positive Voltage */
    else {
        wctdm_setreg(wc, card, 72 , reg72 & 0x3F);
        wait_just_a_bit(HZ/10);
        wctdm_setreg(wc, card, 72 , reg72 ^ 0x40);
        }


I just haven't found the place to put it..

/Soren




More information about the asterisk-users mailing list