Advantech PCI-1682U Manual de usuario Pagina 58

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 104
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 57
PCI-1680U/1682U User Manual 52
The following code is the example to custom baud rate by setting BTR0 and
BTR1 device register.
AdvCANIO.h Line:269
/
**************************************************************
***************
*
* acSetBaudRegister
*
* Purpose:
* Configures baud rate by custom mode.
*
*
* Arguments:
* hDevice - handle of device
* Btr0 - BTR0 register value.
* Btr1 - BTR1 register value.
* Returns:
* =0 SUCCESS; or <0 failure
*
************************************************************
*****************/
int acSetBaudRegister(HANDLE hDevice, unsigned char Btr0,
unsigned char Btr1)
{
unsigned int BaudRateValue = Btr0 * 256;
BaudRateValue += Btr1;
return acSetBaud(hDevice, BaudRateValue);
}
can_receive.cpp Line:105
nRet = acSetBaudRegister( hDevice, byBtr0, byBtr1 ); //Set
baud rate
if ( nRet < 0 )
{
SetDlgItemText( hwnd, IDC_SHOW_RESULT, "Failed to set Baud
Rate!" );
return FALSE;
}
Vista de pagina 57
1 2 ... 53 54 55 56 57 58 59 60 61 62 63 ... 103 104

Comentarios a estos manuales

Sin comentarios