Chapter 6 Communications Modules

SMART I/O User’s Manual

 

 

 

 

 

 

 

 

 

 

6.2.12.5 SMSSISetCtrlReg

Syntax

error_code SMSSISetCtrlReg(u_int8 PortNr, long CtrlReg1, long CtrlReg2, long CtrlReg3, u_int32 *pData);

Description

This function sets the internal register images of all 3 parts of the 24-bit control register with values <> -1 and sends them to the SM-SSI. Simultane- ously, the contents of the data register holding the last value is read back to the address pointed to by pData.

Input

u_int8 PortNr long CntrlReg1 long CntrlReg2 long CntrlReg3 u_int32 *pData

Output

error_code

Example

SM-Port number to send register (0 to 10) Control register 1 value (0x0 -> 0xFF) Control register 2 value (0x0 -> 0xFF) Control register 3 value (0x0 -> 0xFF) Pointer to the value returned from the data register (0x0 -> 0xFFFFFF)

SUCCESS

E_BMODE if the module is unknown or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

6

RetVal = SMSSISetCtrlReg(0, 0x80, 0x17, 0x1, &Data);

 

 

 

 

October 01, 1996

©1996 PEP Modular Computers GmbH

Page 6 - 33

 

 

Page 315
Image 315
Pepper Computer RS232, RS485 user manual SMSSISetCtrlReg Syntax