Rev 4498 | Rev 4723 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4498 | Rev 4708 | ||
---|---|---|---|
Line 1583... | Line 1583... | ||
1583 | static void insb(port_t port, void *buf, size_t size) |
1583 | static void insb(port_t port, void *buf, size_t size) |
1584 | { |
1584 | { |
1585 | size_t i; |
1585 | size_t i; |
1586 | 1586 | ||
1587 | for( i = 0; i < size; ++ i ){ |
1587 | for( i = 0; i < size; ++ i ){ |
1588 | *(( uint8_t * )( buf + i )) = inb( port ); |
1588 | *(( uint8_t * ) buf + i ) = inb( port ); |
1589 | } |
1589 | } |
1590 | } |
1590 | } |
1591 | 1591 | ||
1592 | static void insw(port_t port, void *buf, size_t size) |
1592 | static void insw(port_t port, void *buf, size_t size) |
1593 | { |
1593 | { |
1594 | size_t i; |
1594 | size_t i; |
1595 | 1595 | ||
1596 | for( i = 0; i < size; i += 2 ){ |
1596 | for( i = 0; i * 2 < size; ++ i ){ |
1597 | *(( uint16_t * )( buf + i )) = inw( port ); |
1597 | *(( uint16_t * ) buf + i ) = inw( port ); |
1598 | } |
1598 | } |
1599 | } |
1599 | } |
1600 | 1600 | ||
1601 | static void outsb(port_t port, void *buf, size_t size) |
1601 | static void outsb(port_t port, void *buf, size_t size) |
1602 | { |
1602 | { |
1603 | size_t i; |
1603 | size_t i; |
1604 | 1604 | ||
1605 | for( i = 0; i < size; ++ i ){ |
1605 | for( i = 0; i < size; ++ i ){ |
1606 | outb( port, *(( uint8_t * )( buf + i ))); |
1606 | outb( port, *(( uint8_t * ) buf + i )); |
1607 | } |
1607 | } |
1608 | } |
1608 | } |
1609 | 1609 | ||
1610 | static void outsw(port_t port, void *buf, size_t size) |
1610 | static void outsw(port_t port, void *buf, size_t size) |
1611 | { |
1611 | { |
1612 | size_t i; |
1612 | size_t i; |
1613 | 1613 | ||
1614 | for( i = 0; i < size; i += 2 ){ |
1614 | for( i = 0; i * 2 < size; ++ i ){ |
1615 | outw( port, *(( uint16_t * )( buf + i ))); |
1615 | outw( port, *(( uint16_t * ) buf + i )); |
1616 | } |
1616 | } |
1617 | } |
1617 | } |
1618 | 1618 | ||
1619 | /* |
1619 | /* |
1620 | * $PchId: dp8390.c,v 1.25 2005/02/10 17:32:07 philip Exp $ |
1620 | * $PchId: dp8390.c,v 1.25 2005/02/10 17:32:07 philip Exp $ |