Changeset 7715994 in mainline for uspace/srv/net/netif/dp8390/dp8390_port.h
- Timestamp:
- 2010-03-13T12:17:02Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ba20a6b
- Parents:
- d0febca (diff), 2070570 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/netif/dp8390/dp8390_port.h
rd0febca r7715994 48 48 * @param[in] params The function parameters definition. 49 49 */ 50 #define _PROTOTYPE( function, params) function params50 #define _PROTOTYPE(function, params) function params 51 51 52 52 /** Success error code. … … 70 70 * @returns 1 if the second is greater than the first. 71 71 */ 72 #define memcmp( first, second, size ) bcmp(( char * ) ( first ), ( char * ) ( second ), ( size))72 #define memcmp(first, second, size) bcmp((char *) (first), (char *) (second), (size)) 73 73 74 74 /** Reads 1 byte. … … 76 76 * @returns The read value. 77 77 */ 78 #define inb( port ) pio_read_8(( ioport8_t * ) ( port))78 #define inb(port) pio_read_8((ioport8_t *) (port)) 79 79 80 80 /** Reads 1 word (2 bytes). … … 82 82 * @returns The read value. 83 83 */ 84 #define inw( port ) pio_read_16(( ioport16_t * ) ( port))84 #define inw(port) pio_read_16((ioport16_t *) (port)) 85 85 86 86 /** Writes 1 byte. … … 88 88 * @param[in] value The value to be written. 89 89 */ 90 #define outb( port, value ) pio_write_8(( ioport8_t * ) ( port ), ( value))90 #define outb(port, value) pio_write_8((ioport8_t *) (port), (value)) 91 91 92 92 /** Writes 1 word (2 bytes). … … 94 94 * @param[in] value The value to be written. 95 95 */ 96 #define outw( port, value ) pio_write_16(( ioport16_t * ) ( port ), ( value))96 #define outw(port, value) pio_write_16((ioport16_t *) (port), (value)) 97 97 98 98 /** Prints out the driver critical error. 99 99 * Does not call the system panic(). 100 100 */ 101 #define panic( ... ) printf( "%s%s%d", __VA_ARGS__)101 #define panic(...) printf("%s%s%d", __VA_ARGS__) 102 102 103 103 /** Copies a memory block. … … 111 111 * @returns EOK. 112 112 */ 113 #define sys_vircopy( proc, src_s, src, me, dst_s, dst, bytes ) ({ memcpy(( void * )( dst ), ( void * )( src ), ( bytes )); EOK;})113 #define sys_vircopy(proc, src_s, src, me, dst_s, dst, bytes) ({memcpy((void *)(dst), (void *)(src), (bytes)); EOK;}) 114 114 115 115 /** Reads a memory block byte by byte. … … 119 119 * @param[in] bytes The block size in bytes. 120 120 */ 121 #define do_vir_insb( port, proc, dst, bytes ) insb(( port ), ( void * )( dst ), ( bytes))121 #define do_vir_insb(port, proc, dst, bytes) insb((port), (void *)(dst), (bytes)) 122 122 123 123 /** Reads a memory block word by word (2 bytes). … … 127 127 * @param[in] bytes The block size in bytes. 128 128 */ 129 #define do_vir_insw( port, proc, dst, bytes ) insw(( port ), ( void * )( dst ), ( bytes))129 #define do_vir_insw(port, proc, dst, bytes) insw((port), (void *)(dst), (bytes)) 130 130 131 131 /** Writes a memory block byte by byte. … … 135 135 * @param[in] bytes The block size in bytes. 136 136 */ 137 #define do_vir_outsb( port, proc, src, bytes ) outsb(( port ), ( void * )( src ), ( bytes))137 #define do_vir_outsb(port, proc, src, bytes) outsb((port), (void *)(src), (bytes)) 138 138 139 139 /** Writes a memory block word by word (2 bytes). … … 143 143 * @param[in] bytes The block size in bytes. 144 144 */ 145 #define do_vir_outsw( port, proc, src, bytes ) outsw(( port ), ( void * )( src ), ( bytes))145 #define do_vir_outsw(port, proc, src, bytes) outsw((port), (void *)(src), (bytes)) 146 146 147 147 /* com.h */
Note:
See TracChangeset
for help on using the changeset viewer.