From: Paul C. <pa...@us...> - 2005-02-26 17:31:51
|
Update of /cvsroot/emc/emc2/src/emc/drivers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv379 Added Files: Tag: bdi-4 realtimeio.c Log Message: The start of an IO controller that uses the realtime code & hardware (for example, the Vital card). --- NEW FILE: realtimeio.c --- /******************************************************************** * * Description: realtimeio.c * Low level driver to route user space IO through to the realtime * code. Typically, this would be linked to bridgeportio and used * in conjunction with the Vital card or Jon Elson's ppmc interface. * * Author: Paul Corner * License: GPL Version 2 * System: Linux * * Copyright (c) 2004 All rights reserved. * * Last change: * $Revision: 1.1.2.1 $ * $Author: paul_c $ * $Date: 2005/02/26 17:31:42 $ ********************************************************************/ #include "emcmot.h" int rtDioWrite(int index, int value) { emcmotCommand.command = EMCMOT_SET_INDEX_BIT; emcmotCommand.index = index; emcmotCommand.start = start; emcmotCommand.end = end; emcmotCommand.now = now; return usrmotWriteEmcmotCommand(&emcmotCommand); } int rtDioRead(int index, *value) { int status = 0; emcmotCommand.command = EMCMOT_READ_INDEX_BIT; emcmotCommand.index = index; emcmotCommand.start = start; emcmotCommand.end = end; emcmotCommand.now = now; status = usrmotWriteEmcmotCommand(&emcmotCommand); *value = emcmotStatus->level; return status; } |