Download general information hardware installation user

Transcript
C Library Functions
Library Function Descriptions
D.3.35
dsp_check_service_request—Check for Service Request
#include "simcom.h"
#include "protocom.h"
int dsp_check_service_request(device_index)
int device_index;/* device affected by operation */
Y
dsp_check_service_request() checks to see if the target device device_index is
requesting service from the host computer, that is, checks to see if the target device is in
Debug Mode.
AR
The return value is TRUE if the device is requesting service, FALSE if it is not, and
DSP_ERROR if the function cannot complete successfully.
Example D-35 dsp_check_service_request()
int devn = 0;
int ok;
IN
/* Check if device 0 is requesting service */
#include "simcom.h"
#include "protocom.h"
IM
dsp_new(devn,"56002");/* Allocate structure for device 0, a 56002 */
ok = dsp_cc_reset(devn);/* reset Command Converter */
ok = dsp_reset(devn);/* and device 0 to debug mode*/
PR
EL
ok = dsp_check_service_request(devn)/* Is device ’devn’ requesting service? */
D-42
DSPADSUM/AD
MOTOROLA