Exemplo n.º 1
0
 static void FM_STATUS_RESET(FM_ST ST, int flag)
 {
     /* reset status flag */
     ST.status &= (byte)~flag;
     if ((ST.irq) != 0 && (ST.status & ST.irqmask) == 0)
     {
         ST.irq = 0;
         /* callback user interrupt handler (IRQ is ON to OFF) */
         if (ST.IRQ_Handler != null) ST.IRQ_Handler(ST.index, 0);
     }
 }
Exemplo n.º 2
0
 static void FM_STATUS_SET(FM_ST ST, int flag)
 {
     /* set status flag */
     ST.status |= (byte)flag;
     if ((ST.irq) == 0 && (ST.status & ST.irqmask) != 0)
     {
         ST.irq = 1;
         /* callback user interrupt handler (IRQ is OFF to ON) */
         if (ST.IRQ_Handler != null) ST.IRQ_Handler(ST.index, 1);
     }
 }