Esempio n. 1
0
VOID
WriteIOPort(
  UINT32 value,
  UINT16 io_port,
  UINT8 len // 1, 2, 4 bytes
  )
{
  if     ( 1 == len ) WritePortByte ( (UINT8)(value&0xFF), io_port );
  else if( 2 == len ) WritePortWord ( (UINT16)(value&0xFFFF), io_port );
  else if( 4 == len ) WritePortDword( value, io_port );
}
Esempio n. 2
0
void WriteIOPort(uint32_t io_port, uint8_t size, uint32_t value){
    switch(size)
    {
        case 1:
            WritePortByte(value,io_port);
            break;
        case 2:
            WritePortWord(value,io_port);
            break;
        case 4:
            WritePortDword(value,io_port);
            break;
    }
}