Aaeon PFM-HDS Manual do Utilizador Página 86

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 105
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 85
PC/104 Module PFM-HDS
Appendix A Programming the Watchdog Timer A-5
WDTSetBit(TimerReg, ModeBit, ModeVal);
// WDT output mode set to active low
WDTSetBit(
TimerReg, PolarityBit, PolarityVal);
// WDT output pulse width is 25ms
WDTSetBit(
TimerReg, PSWidthBit, PSWidthVal);
// Watchdog WDTRST# Enable
WDTSetBit(
DevReg, WDTRstBit, WDTRstVal);
}
VOID
WDTClearTimeoutStatus(){
WDTSetBit(
TimerReg, StatusBit, 1);
}
**************************************************************************
*****
**************************************************************************
*****
VOID
WDTWriteByte(byte Register, byte Value){
IOWriteByte(WDTAddr+Register, Value);
}
byte
WDTReadByte(byte Register){
return IOReadByte(WDTAddr+Register);
}
VOID
WDTSetBit(byte Register, byte Bit, byte Val){
byte TmpValue;
TmpValue = WDTReadByte(Register);
TmpValue &= ~(1 << Bit);
TmpValue |= Val << Bit;
WDTWriteByte(Register, TmpValue);
}
**************************************************************************
*****
Vista de página 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 104 105

Comentários a estes Manuais

Sem comentários