
Module: /home/henthorn/AUV/auv-qnx/auv/altex/onboard/camera/XPortGPIO.cc
Group: 'DGROUP' CONST,CONST2,_DATA,_BSS

Segment: _TEXT  DWORD USE32  000002fe bytes  


/** \file XPortGPIO.cc */

/****************************************************************************/
/* Copyright (c) 2008 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  : Implements XPort GPIO API                                     */
/* Filename : XPortGPIO.cc                                                  */
/* Author   : K Headley                                                     */
/* Project  : Benthic Imaging AUV                                           */
/* Created  : 04/01/2008                                                    */
/****************************************************************************/
/* Modification History:                                                    */
/*  $Id: XPortGPIO.cc,v 1.6 2012/04/06 01:09:39 headley Exp $   */
/*  $Name: FastSim $ */
/****************************************************************************/

#include "XPortGPIO.h"
#ifdef _QNX
#include "System.h"
#endif
#include "BicamConsts.h"

/** Default destructor */
XPortGPIO::~XPortGPIO(){}

/** Default no argument constructor */
 0000                    near XPortGPIO::~XPortGPIO():
 0000  68 04 00 00 00                    push    00000004H
 0005  e8 00 00 00 00                    call    __CHK
 000a  c3                                ret     

XPortGPIO::XPortGPIO(){
 000b                    near XPortGPIO::XPortGPIO():
 000b  68 04 00 00 00                    push    00000004H
 0010  e8 00 00 00 00                    call    __CHK

  _selectMask=CFG_MASK_GPIO_SEL_ALL;
 0015  c7 40 04 ff 00 00 
       00                                mov     dword ptr +4H[eax],000000ffH

  _directionMask=CFG_GPIO_ALL_OUTPUTS;
 001c  c7 40 08 ff 00 00 
       00                                mov     dword ptr +8H[eax],000000ffH

  _activeLevelMask=CFG_GPIO_ACTIVE_HI;
 0023  c7 40 0c 00 00 00 
       00                                mov     dword ptr +0cH[eax],00000000H

  _stateMask=CFG_GPIO_ALL_INACTIVE;
 002a  c7 40 10 00 00 00 
       00                                mov     dword ptr +10H[eax],00000000H

}
/** Initializing constructor 
    @param pXPort XPort to use
    @param selMask GPIO pin select mask (pins to activate when triggering)
    @param activeMask GPIO levels to set when ACTIVE
    @param inactiveMask GPIO levels to when when INACTIVE
*/
 0031  c3                                ret     

XPortGPIO::XPortGPIO(XPort *pXPort,
		     unsigned int selMask,
		     unsigned int dirMask, 
		     unsigned int levMask,
		     unsigned int staMask){
 0032                    near XPortGPIO::XPortGPIO( XPort near *, int unsigned, int unsigned, int unsigned, int unsigned ):
 0032  68 18 00 00 00                    push    00000018H
 0037  e8 00 00 00 00                    call    __CHK
 003c  56                                push    esi
 003d  57                                push    edi
 003e  55                                push    ebp
 003f  89 c6                             mov     esi,eax

  configure(pXPort,selMask,dirMask,levMask,staMask);

 0041  8b 7c 24 14                       mov     edi,+14H[esp]
 0045  57                                push    edi
 0046  8b 6c 24 14                       mov     ebp,+14H[esp]
 004a  55                                push    ebp
 004b  e8 00 00 00 00                    call    int near XPortGPIO::configure( XPort near *, int unsigned, int unsigned, int unsigned, int unsigned )

}

/** Initializing constructor 
    @param selMask GPIO pin select mask (pins to activate when triggering)
    @param activeMask GPIO levels to set when ACTIVE
    @param inactiveMask GPIO levels to set when INACTIVE
*/
 0050  89 f0                             mov     eax,esi
 0052  5d                                pop     ebp
 0053  5f                                pop     edi
 0054  5e                                pop     esi
 0055  c2 08 00                          ret     0008H

XPortGPIO::XPortGPIO(unsigned int selMask,
		     unsigned int dirMask, 
		     unsigned int levMask,
		     unsigned int staMask){
 0058                    near XPortGPIO::XPortGPIO( int unsigned, int unsigned, int unsigned, int unsigned ):
 0058  68 10 00 00 00                    push    00000010H
 005d  e8 00 00 00 00                    call    __CHK
 0062  56                                push    esi
 0063  57                                push    edi
 0064  89 c6                             mov     esi,eax

  configure(selMask,dirMask,levMask,staMask);
 0066  8b 7c 24 0c                       mov     edi,+0cH[esp]
 006a  57                                push    edi
 006b  e8 00 00 00 00                    call    int near XPortGPIO::configure( int unsigned, int unsigned, int unsigned, int unsigned )

}

/** Configure XPort parameters 
    @param pXPort XPort to use
    @param selMask GPIO pin select mask (pins to activate when triggering)
    @param activeMask GPIO levels to set when ACTIVE
    @param inactiveMask GPIO levels to set when INACTIVE
*/
 0070  89 f0                             mov     eax,esi
 0072  5f                                pop     edi
 0073  5e                                pop     esi
 0074  c2 04 00                          ret     0004H

int XPortGPIO::configure(unsigned int selMask,
			 unsigned int dirMask, 
			 unsigned int levMask,
			 unsigned int staMask){

 0077                    int near XPortGPIO::configure( int unsigned, int unsigned, int unsigned, int unsigned ):
 0077  68 04 00 00 00                    push    00000004H
 007c  e8 00 00 00 00                    call    __CHK

  _selectMask=selMask;
 0081  89 50 04                          mov     +4H[eax],edx

  _directionMask=dirMask;
 0084  89 58 08                          mov     +8H[eax],ebx

  _activeLevelMask=levMask;
 0087  89 48 0c                          mov     +0cH[eax],ecx

  _stateMask=staMask;
  return OK;
 008a  8b 54 24 04                       mov     edx,+4H[esp]
 008e  89 50 10                          mov     +10H[eax],edx

}
/** Configure XPort parameters 
    @param pXPort XPort to use
    @param selMask GPIO pin select mask (pins to activate when triggering)
    @param activeMask GPIO levels to set when ACTIVE
    @param inactiveMask GPIO levels to set when INACTIVE
*/
 0091  31 c0                             xor     eax,eax
 0093  c2 04 00                          ret     0004H

int XPortGPIO::configure(XPort *pXPort,
			 unsigned int selMask,
			 unsigned int dirMask, 
			 unsigned int levMask,
			 unsigned int staMask){

  int retval=OK;
 0096                    int near XPortGPIO::configure( XPort near *, int unsigned, int unsigned, int unsigned, int unsigned ):
 0096  68 18 00 00 00                    push    00000018H
 009b  e8 00 00 00 00                    call    __CHK
 00a0  56                                push    esi
 00a1  57                                push    edi
 00a2  83 ec 08                          sub     esp,00000008H
 00a5  89 c6                             mov     esi,eax
 00a7  89 d7                             mov     edi,edx
 00a9  89 da                             mov     edx,ebx
 00ab  89 cb                             mov     ebx,ecx

  XPortResponse xpr;
  /* set member variables */
 00ad  89 e0                             mov     eax,esp
 00af  e8 00 00 00 00                    call    near XPortResponse::XPortResponse()

  retval=configure(selMask,dirMask,levMask,staMask);

  /* set xport reference */
 00b4  8b 4c 24 18                       mov     ecx,+18H[esp]
 00b8  51                                push    ecx
 00b9  8b 4c 24 18                       mov     ecx,+18H[esp]
 00bd  89 f0                             mov     eax,esi
 00bf  e8 00 00 00 00                    call    int near XPortGPIO::configure( int unsigned, int unsigned, int unsigned, int unsigned )

  xport=pXPort;
  /* configure hardware pin 
     using just-configured default masks and values
     ** don't do this: XPort sets GPIO pins inactive
     ** when setActiveLevel or setDirect commands
     ** are received
  */
  //setActiveLevel(levVals,&xpr);
  //setDirection(dirVals,&xpr);
  return retval;
 00c4  89 3e                             mov     [esi],edi

}
/** Establish XPort socket connections for GPIO and serial communications.
    @param host XPort TCP/IP host name/address
    @param gpioIPPort XPort TCP/IP port for GPIO
    @param dirMask GPIO direction control mask
    @param dirValues GPIO direction value mask (set input/output)
    @param levelMask GPIO level control mask 
    @param levelValues GPIO level value mask
*/
 00c6  83 c4 08                          add     esp,00000008H
 00c9  5f                                pop     edi
 00ca  5e                                pop     esi
 00cb  c2 08 00                          ret     0008H

XPort *XPortGPIO::connect( char *host,
			      int gpioIPPort, 
			      unsigned int dirMask,
			      unsigned int dirValues,
			      unsigned int levelMask,
			      unsigned int levelValues){
  XPortConnection *xpc;
 00ce                    XPort near * near XPortGPIO::connect( char near *, int, int unsigned, int unsigned, int unsigned, int unsigned ):
 00ce  68 18 00 00 00                    push    00000018H
 00d3  e8 00 00 00 00                    call    __CHK
 00d8  56                                push    esi
 00d9  57                                push    edi
 00da  55                                push    ebp
 00db  89 c6                             mov     esi,eax
 00dd  89 dd                             mov     ebp,ebx
 00df  89 cb                             mov     ebx,ecx

  xpc=xport->getConnection();
 00e1  8b 00                             mov     eax,[eax]
 00e3  e8 00 00 00 00                    call    XPortConnection near * near XPort::getConnection()
 00e8  89 c7                             mov     edi,eax

  xpc->configHost(host);
 00ea  e8 00 00 00 00                    call    int near XPortConnection::configHost( char near * )

  xpc->configGPIO(gpioIPPort, 
		  dirMask,
		  dirValues,
		  levelMask,
		  levelValues);
 00ef  8b 54 24 18                       mov     edx,+18H[esp]
 00f3  52                                push    edx
 00f4  8b 4c 24 18                       mov     ecx,+18H[esp]
 00f8  51                                push    ecx
 00f9  8b 4c 24 18                       mov     ecx,+18H[esp]
 00fd  89 ea                             mov     edx,ebp
 00ff  89 f8                             mov     eax,edi
 0101  e8 00 00 00 00                    call    int near XPortConnection::configGPIO( int, int unsigned, int unsigned, int unsigned, int unsigned )

  if(xport->connectxp(XPCON_GPIO)==ERROR){
 0106  8b 06                             mov     eax,[esi]
 0108  ba 01 00 00 00                    mov     edx,00000001H
 010d  e8 00 00 00 00                    call    int near XPort::connectxp( ConnectionID )
 0112  83 f8 ff                          cmp     eax,0ffffffffH
 0115  75 1d                             jne     L1

    cout << "connect: ERROR - connectxp failed"<<endl;
 0117  ba 00 00 00 00                    mov     edx,offset L5
 011c  b8 00 00 00 00                    mov     eax,offset ostream near cout
 0121  e8 00 00 00 00                    call    ostream near & near ostream::operator <<( char const near * )
 0126  ba 00 00 00 00                    mov     edx,offset ostream near & near endl( ostream near & )
 012b  e8 00 00 00 00                    call    ostream near & near ostream::operator <<( ostream near & (near *)( ))

    return NULL;
  }
  
 0130  31 c0                             xor     eax,eax
 0132  eb 02                             jmp     L2

  return xport;
 0134  8b 06             L1              mov     eax,[esi]

}
/** @return XPort member variable */
 0136  5d                L2              pop     ebp
 0137  5f                                pop     edi
 0138  5e                                pop     esi
 0139  c2 0c 00                          ret     000cH

XPort *XPortGPIO::getXPort(){
  return xport;
 013c                    XPort near * near XPortGPIO::getXPort():
 013c  68 04 00 00 00                    push    00000004H
 0141  e8 00 00 00 00                    call    __CHK

}
/** Set XPort member variable
    @param xp pointer to XPort
*/
 0146  8b 00                             mov     eax,[eax]
 0148  c3                                ret     

void XPortGPIO::setXPort(XPort *xp){
 0149                    void near XPortGPIO::setXPort( XPort near * ):
 0149  68 04 00 00 00                    push    00000004H
 014e  e8 00 00 00 00                    call    __CHK

  xport=xp;
 0153  89 10                             mov     [eax],edx

}

/** Activates GPIO pins set
    using the configure method.
*/
 0155  c3                                ret     

int XPortGPIO::setActive(){
 0156                    int near XPortGPIO::setActive():
 0156  68 10 00 00 00                    push    00000010H
 015b  e8 00 00 00 00                    call    __CHK
 0160  53                                push    ebx
 0161  51                                push    ecx
 0162  52                                push    edx

  return setCurrentState(_selectMask,_stateMask,NULL);
 0163  8b 58 10                          mov     ebx,+10H[eax]
 0166  8b 50 04          L3              mov     edx,+4H[eax]
 0169  31 c9                             xor     ecx,ecx
 016b  e8 00 00 00 00                    call    int near XPortGPIO::setCurrentState( int unsigned, int unsigned, XPortResponse near * )

}

/** Deactivates GPIO pins set
    using the configure method.
*/
 0170  5a                                pop     edx
 0171  59                                pop     ecx
 0172  5b                                pop     ebx
 0173  c3                                ret     

int XPortGPIO::setInactive(){
 0174                    int near XPortGPIO::setInactive():
 0174  68 10 00 00 00                    push    00000010H
 0179  e8 00 00 00 00                    call    __CHK
 017e  53                                push    ebx
 017f  51                                push    ecx
 0180  52                                push    edx

  return setCurrentState(_selectMask,~_stateMask,NULL);
}

/** Activates then deactivates GPIO pins set
    using the configure method.
*/
 0181  8b 58 10                          mov     ebx,+10H[eax]
 0184  f7 d3                             not     ebx
 0186  eb de                             jmp     L3

int XPortGPIO::pulse(){
 0188                    int near XPortGPIO::pulse():
 0188  68 08 00 00 00                    push    00000008H
 018d  e8 00 00 00 00                    call    __CHK
 0192  52                                push    edx
 0193  89 c2                             mov     edx,eax

  setActive();
#ifdef _QNX
 0195  e8 00 00 00 00                    call    int near XPortGPIO::setActive()

  System::milliSleep(100);
#else
	usleep(100000);	
#endif
 019a  b8 64 00 00 00                    mov     eax,00000064H
 019f  e8 00 00 00 00                    call    void near System::milliSleep( long unsigned )

  setInactive();
  return OK;
 01a4  89 d0                             mov     eax,edx
 01a6  e8 00 00 00 00                    call    int near XPortGPIO::setInactive()

}

/** Set GPIO pin direction using current select and direction mask values.
    @param response Contains XPort response returned
    @return IS_VALID if successful, ERR_NULL if response set to NULL or other error code otherwise.
 */
 01ab  31 c0                             xor     eax,eax
 01ad  5a                                pop     edx
 01ae  c3                                ret     

int XPortGPIO::setDirection(unsigned int values, XPortResponse *response){
 01af                    int near XPortGPIO::setDirection( int unsigned, XPortResponse near * ):
 01af  68 0c 00 00 00                    push    0000000cH
 01b4  e8 00 00 00 00                    call    __CHK
 01b9  51                                push    ecx
 01ba  56                                push    esi

  return setDirection(_selectMask,values,response);
 01bb  8b 70 04                          mov     esi,+4H[eax]
 01be  89 d9                             mov     ecx,ebx
 01c0  89 d3                             mov     ebx,edx
 01c2  89 f2                             mov     edx,esi
 01c4  e8 00 00 00 00                    call    int near XPortGPIO::setDirection( int unsigned, int unsigned, XPortResponse near * )

}

/** Set GPIO pin direction
    @param mask Pin selection mask (1: set pin 0: ignore pin)
    @param values Direction value mask (1: output 0: input)
    @param response Contains XPort response returned
    @return IS_VALID if successful, ERR_NULL if response set to NULL or other error code otherwise.
 */
 01c9  5e                                pop     esi
 01ca  59                                pop     ecx
 01cb  c3                                ret     

int XPortGPIO::setDirection(unsigned int mask, unsigned int values,XPortResponse *response){
 01cc                    int near XPortGPIO::setDirection( int unsigned, int unsigned, XPortResponse near * ):
 01cc  68 18 00 00 00                    push    00000018H
 01d1  e8 00 00 00 00                    call    __CHK
 01d6  56                                push    esi
 01d7  57                                push    edi
 01d8  83 ec 0c                          sub     esp,0000000cH
 01db  89 c6                             mov     esi,eax
 01dd  89 cf                             mov     edi,ecx

  XPortCommand cmd;

  /* set up XPort command. */
 01df  89 e0                             mov     eax,esp
 01e1  e8 00 00 00 00                    call    near XPortCommand::XPortCommand()

  cmd.set(XP_CMD_SET_DIRECTIONS,mask,values);

  /* Set direction of selected GPIO pins.
     XPort response is returned in response
  */
 01e6  89 d9                             mov     ecx,ebx
 01e8  89 d3                             mov     ebx,edx
 01ea  ba 19 00 00 00                    mov     edx,00000019H
 01ef  89 e0             L4              mov     eax,esp
 01f1  e8 00 00 00 00                    call    void near XPortCommand::set( char unsigned, int unsigned, int unsigned )

   return xport->writeRead(&cmd,response);
 01f6  8b 06                             mov     eax,[esi]
 01f8  89 fb                             mov     ebx,edi
 01fa  89 e2                             mov     edx,esp
 01fc  e8 00 00 00 00                    call    int near XPort::writeRead( XPortCommand near *, XPortResponse near * )

}

/** Set GPIO pin active levels using current select and active level mask values.
    @param response Contains XPort response returned
    @return IS_VALID if successful, ERR_NULL if response set to NULL or other error code otherwise.
 */
 0201  83 c4 0c                          add     esp,0000000cH
 0204  5f                                pop     edi
 0205  5e                                pop     esi
 0206  c3                                ret     

int XPortGPIO::setActiveLevel(unsigned int values, XPortResponse *response){
 0207                    int near XPortGPIO::setActiveLevel( int unsigned, XPortResponse near * ):
 0207  68 0c 00 00 00                    push    0000000cH
 020c  e8 00 00 00 00                    call    __CHK
 0211  51                                push    ecx
 0212  56                                push    esi

  return setActiveLevel(_selectMask ,values,response);
 0213  8b 70 04                          mov     esi,+4H[eax]
 0216  89 d9                             mov     ecx,ebx
 0218  89 d3                             mov     ebx,edx
 021a  89 f2                             mov     edx,esi
 021c  e8 00 00 00 00                    call    int near XPortGPIO::setActiveLevel( int unsigned, int unsigned, XPortResponse near * )

}
/** Set GPIO pin active level
    @param mask Pin selection mask (1: set pin 0: ignore pin)
    @param values Level value mask (1: active LO, 0: active HI)
    @param response Contains XPort response returned
    @return IS_VALID if successful, ERR_NULL if response set to NULL or other error code otherwise.
 */
 0221  5e                                pop     esi
 0222  59                                pop     ecx
 0223  c3                                ret     

int XPortGPIO::setActiveLevel(unsigned int mask, unsigned int values,XPortResponse *response){
 0224                    int near XPortGPIO::setActiveLevel( int unsigned, int unsigned, XPortResponse near * ):
 0224  68 18 00 00 00                    push    00000018H
 0229  e8 00 00 00 00                    call    __CHK
 022e  56                                push    esi
 022f  57                                push    edi
 0230  83 ec 0c                          sub     esp,0000000cH
 0233  89 c6                             mov     esi,eax
 0235  89 cf                             mov     edi,ecx

  XPortCommand cmd;

  /* set up XPort command. */
 0237  89 e0                             mov     eax,esp
 0239  e8 00 00 00 00                    call    near XPortCommand::XPortCommand()

  cmd.set(XP_CMD_SET_ACTIVE_LEVELS,mask,values);

  /* Change active level of selected GPIO pins.
     XPort response is returned in response
  */
  return xport->writeRead(&cmd,response);
}

/** Set state of GPIO pins using current select and state mask values.
    @param response Contains XPort response returned
    @return IS_VALID if successful, ERR_NULL if response set to NULL or other error code otherwise.
*/
 023e  89 d9                             mov     ecx,ebx
 0240  89 d3                             mov     ebx,edx
 0242  ba 1a 00 00 00                    mov     edx,0000001aH
 0247  eb a6                             jmp     L4

int XPortGPIO::setCurrentState(unsigned int values, XPortResponse *response){
 0249                    int near XPortGPIO::setCurrentState( int unsigned, XPortResponse near * ):
 0249  68 0c 00 00 00                    push    0000000cH
 024e  e8 00 00 00 00                    call    __CHK
 0253  51                                push    ecx
 0254  56                                push    esi

  return setCurrentState(_selectMask,values,response);
 0255  8b 70 04                          mov     esi,+4H[eax]
 0258  89 d9                             mov     ecx,ebx
 025a  89 d3                             mov     ebx,edx
 025c  89 f2                             mov     edx,esi
 025e  e8 00 00 00 00                    call    int near XPortGPIO::setCurrentState( int unsigned, int unsigned, XPortResponse near * )

}

/** Set state of GPIO pins using specified select and value mask values.

    @param mask Pin selection mask (1: set pin 0: ignore pin)
    @param values Level value mask (1: active, 0: inactive)
    @param response Contains XPort response returned
    @return IS_VALID if successful, ERR_NULL if response set to NULL or other error code otherwise.
*/
 0263  5e                                pop     esi
 0264  59                                pop     ecx
 0265  c3                                ret     

int XPortGPIO::setCurrentState(unsigned int mask, unsigned int values,XPortResponse *response){
 0266                    int near XPortGPIO::setCurrentState( int unsigned, int unsigned, XPortResponse near * ):
 0266  68 18 00 00 00                    push    00000018H
 026b  e8 00 00 00 00                    call    __CHK
 0270  56                                push    esi
 0271  57                                push    edi
 0272  83 ec 0c                          sub     esp,0000000cH
 0275  89 c6                             mov     esi,eax
 0277  89 cf                             mov     edi,ecx

  XPortCommand cmd;

  /* set up XPort command. */
 0279  89 e0                             mov     eax,esp
 027b  e8 00 00 00 00                    call    near XPortCommand::XPortCommand()

  cmd.set(XP_CMD_SET_CURRENT_STATES,mask,values);

  /* Change state of selected GPIO pins.
     XPort response is returned in response
  */
  return xport->writeRead(&cmd,response);

}

/** @return select mask member variable */
 0280  89 d9                             mov     ecx,ebx
 0282  89 d3                             mov     ebx,edx
 0284  ba 1b 00 00 00                    mov     edx,0000001bH
 0289  e9 61 ff ff ff                    jmp     L4

unsigned int XPortGPIO::getSelectMask(){
  return _selectMask;
 028e                    int unsigned near XPortGPIO::getSelectMask():
 028e  68 04 00 00 00                    push    00000004H
 0293  e8 00 00 00 00                    call    __CHK

}
/** @return direction mask member variable */
 0298  8b 40 04                          mov     eax,+4H[eax]
 029b  c3                                ret     

unsigned int XPortGPIO::getDirectionMask(){
  return _directionMask;
 029c                    int unsigned near XPortGPIO::getDirectionMask():
 029c  68 04 00 00 00                    push    00000004H
 02a1  e8 00 00 00 00                    call    __CHK

}
/** @return active level mask member variable */
 02a6  8b 40 08                          mov     eax,+8H[eax]
 02a9  c3                                ret     

unsigned int XPortGPIO::getActiveLevelMask(){
  return _activeLevelMask;
 02aa                    int unsigned near XPortGPIO::getActiveLevelMask():
 02aa  68 04 00 00 00                    push    00000004H
 02af  e8 00 00 00 00                    call    __CHK

}
/** @return GPIO pin state mask member variable */
 02b4  8b 40 0c                          mov     eax,+0cH[eax]
 02b7  c3                                ret     

unsigned int XPortGPIO::getStateMask(){
  return _stateMask;
 02b8                    int unsigned near XPortGPIO::getStateMask():
 02b8  68 04 00 00 00                    push    00000004H
 02bd  e8 00 00 00 00                    call    __CHK

}
/** Set select mask member variable */
 02c2  8b 40 10                          mov     eax,+10H[eax]
 02c5  c3                                ret     

void XPortGPIO::setSelectMask(unsigned int mask){
 02c6                    void near XPortGPIO::setSelectMask( int unsigned ):
 02c6  68 04 00 00 00                    push    00000004H
 02cb  e8 00 00 00 00                    call    __CHK

  _selectMask=mask;
 02d0  89 50 04                          mov     +4H[eax],edx

}
/** Set direction mask member variable
    @param mask new mask value
*/
 02d3  c3                                ret     

void XPortGPIO::setDirectionMask(unsigned int mask){
 02d4                    void near XPortGPIO::setDirectionMask( int unsigned ):
 02d4  68 04 00 00 00                    push    00000004H
 02d9  e8 00 00 00 00                    call    __CHK

  _directionMask=mask;
 02de  89 50 08                          mov     +8H[eax],edx

}
/** Set active level mask member variable
    @param mask new mask value
*/
 02e1  c3                                ret     

void XPortGPIO::setActiveLevelMask(unsigned int mask){
 02e2                    void near XPortGPIO::setActiveLevelMask( int unsigned ):
 02e2  68 04 00 00 00                    push    00000004H
 02e7  e8 00 00 00 00                    call    __CHK

  _activeLevelMask=mask;
 02ec  89 50 0c                          mov     +0cH[eax],edx

}
/** Set GPIO pin state mask member variable */
 02ef  c3                                ret     

void XPortGPIO::setStateMask(unsigned int mask){
 02f0                    void near XPortGPIO::setStateMask( int unsigned ):
 02f0  68 04 00 00 00                    push    00000004H
 02f5  e8 00 00 00 00                    call    __CHK

  _stateMask=mask;
 02fa  89 50 10                          mov     +10H[eax],edx

}
 02fd  c3                                ret     

No disassembly errors

------------------------------------------------------------

Segment: CONST  DWORD USE32  00000022 bytes  
 0000  63 6f 6e 6e 65 63 74 3a L5              - connect:
 0008  20 45 52 52 4f 52 20 2d                 -  ERROR -
 0010  20 63 6f 6e 6e 65 63 74                 -  connect
 0018  78 70 20 66 61 69 6c 65                 - xp faile
 0020  64 00                                   - d.

No disassembly errors

------------------------------------------------------------

Comdat: istream near & near operator >>( istream near &, <long near >::smanip const near & )  SEGMENT ANY '_TEXT'  00000021 bytes  
 0000  68 0c 00 00 00                    push    0000000cH
 0005  e8 00 00 00 00                    call    __CHK
 000a  53                                push    ebx
 000b  51                                push    ecx
 000c  89 c3                             mov     ebx,eax
 000e  89 d1                             mov     ecx,edx
 0010  8b 52 04                          mov     edx,+4H[edx]
 0013  8b 00                             mov     eax,[eax]
 0015  8b 40 04                          mov     eax,+4H[eax]
 0018  01 d8                             add     eax,ebx
 001a  ff 11                             call    dword ptr [ecx]
 001c  89 d8                             mov     eax,ebx
 001e  59                                pop     ecx
 001f  5b                                pop     ebx
 0020  c3                                ret     

No disassembly errors

------------------------------------------------------------

Comdat: istream near & near operator >>( istream near &, <int near >::smanip const near & )  SEGMENT ANY '_TEXT'  00000021 bytes  
 0000  68 0c 00 00 00                    push    0000000cH
 0005  e8 00 00 00 00                    call    __CHK
 000a  53                                push    ebx
 000b  51                                push    ecx
 000c  89 c3                             mov     ebx,eax
 000e  89 d1                             mov     ecx,edx
 0010  8b 52 04                          mov     edx,+4H[edx]
 0013  8b 00                             mov     eax,[eax]
 0015  8b 40 04                          mov     eax,+4H[eax]
 0018  01 d8                             add     eax,ebx
 001a  ff 11                             call    dword ptr [ecx]
 001c  89 d8                             mov     eax,ebx
 001e  59                                pop     ecx
 001f  5b                                pop     ebx
 0020  c3                                ret     

No disassembly errors

------------------------------------------------------------

Comdat: ostream near & near operator <<( ostream near &, <long near >::smanip const near & )  SEGMENT ANY '_TEXT'  00000021 bytes  
 0000  68 0c 00 00 00                    push    0000000cH
 0005  e8 00 00 00 00                    call    __CHK
 000a  53                                push    ebx
 000b  51                                push    ecx
 000c  89 c3                             mov     ebx,eax
 000e  89 d1                             mov     ecx,edx
 0010  8b 52 04                          mov     edx,+4H[edx]
 0013  8b 00                             mov     eax,[eax]
 0015  8b 40 04                          mov     eax,+4H[eax]
 0018  01 d8                             add     eax,ebx
 001a  ff 11                             call    dword ptr [ecx]
 001c  89 d8                             mov     eax,ebx
 001e  59                                pop     ecx
 001f  5b                                pop     ebx
 0020  c3                                ret     

No disassembly errors

------------------------------------------------------------

Comdat: ostream near & near operator <<( ostream near &, <int near >::smanip const near & )  SEGMENT ANY '_TEXT'  00000021 bytes  
 0000  68 0c 00 00 00                    push    0000000cH
 0005  e8 00 00 00 00                    call    __CHK
 000a  53                                push    ebx
 000b  51                                push    ecx
 000c  89 c3                             mov     ebx,eax
 000e  89 d1                             mov     ecx,edx
 0010  8b 52 04                          mov     edx,+4H[edx]
 0013  8b 00                             mov     eax,[eax]
 0015  8b 40 04                          mov     eax,+4H[eax]
 0018  01 d8                             add     eax,ebx
 001a  ff 11                             call    dword ptr [ecx]
 001c  89 d8                             mov     eax,ebx
 001e  59                                pop     ecx
 001f  5b                                pop     ebx
 0020  c3                                ret     

No disassembly errors

------------------------------------------------------------
