Changeset 74864ac in mainline for uspace/srv/hw/netif/dp8390/dp8390_port.h
- Timestamp:
- 2011-01-06T15:28:51Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0777f4c5
- Parents:
- fc23ef6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/dp8390_port.h
rfc23ef6 r74864ac 44 44 #include <sys/types.h> 45 45 46 /** Macro for difining functions.47 * @param[in] function The function type and name definition.48 * @param[in] params The function parameters definition.49 */50 #define _PROTOTYPE(function, params) function params51 52 /** Type definition of the unsigned byte.53 */54 typedef uint8_t u8_t;55 56 /** Type definition of the unsigned short.57 */58 typedef uint16_t u16_t;59 60 46 /** Compares two memory blocks. 61 47 * @param[in] first The first memory block. … … 66 52 * @returns 1 if the second is greater than the first. 67 53 */ 68 #define memcmp(first, second, size) 54 #define memcmp(first, second, size) bcmp((char *) (first), (char *) (second), (size)) 69 55 70 56 /** Reads 1 byte. … … 72 58 * @returns The read value. 73 59 */ 74 #define inb(port) 60 #define inb(port) pio_read_8((ioport8_t *) (port)) 75 61 76 62 /** Reads 1 word (2 bytes). … … 78 64 * @returns The read value. 79 65 */ 80 #define inw(port) 66 #define inw(port) pio_read_16((ioport16_t *) (port)) 81 67 82 68 /** Writes 1 byte. … … 84 70 * @param[in] value The value to be written. 85 71 */ 86 #define outb(port, value) 72 #define outb(port, value) pio_write_8((ioport8_t *) (port), (value)) 87 73 88 74 /** Writes 1 word (2 bytes). … … 90 76 * @param[in] value The value to be written. 91 77 */ 92 #define outw(port, value) pio_write_16((ioport16_t *) (port), (value)) 93 94 /** Prints out the driver critical error. 95 * Does not call the system panic(). 96 */ 97 #define panic(...) printf("%s%s%d", __VA_ARGS__) 78 #define outw(port, value) pio_write_16((ioport16_t *) (port), (value)) 98 79 99 80 /** Copies a memory block. … … 141 122 #define do_vir_outsw(port, proc, src, bytes) outsw((port), (void *)(src), (bytes)) 142 123 143 /* com.h */144 124 /* Bits in 'DL_MODE' field of DL requests. */ 145 # define DL_NOMODE 0x0 146 # define DL_PROMISC_REQ 0x2 147 # define DL_MULTI_REQ 0x4 148 # define DL_BROAD_REQ 0x8 149 150 /* const.h */ 151 /** True value. 152 */ 153 #define TRUE 1 /* used for turning integers into Booleans */ 154 155 /** False value. 156 */ 157 #define FALSE 0 /* used for turning integers into Booleans */ 158 159 /** No number value. 160 */ 161 #define NO_NUM 0x8000 /* used as numerical argument to panic() */ 162 163 /* devio.h */ 164 //typedef u16_t port_t; 125 #define DL_NOMODE 0x0 126 #define DL_PROMISC_REQ 0x2 127 #define DL_MULTI_REQ 0x4 128 #define DL_BROAD_REQ 0x8 129 165 130 /** Type definition of a port. 166 131 */ 167 132 typedef long port_t; 168 133 169 /* dl_eth.h */170 134 /** Ethernet statistics. 171 135 */ 172 typedef struct eth_stat 173 { 136 typedef struct eth_stat { 174 137 /** Number of receive errors. 175 138 */ … … 242 205 /** Address data. 243 206 */ 244 u 8_t ea_addr[6];207 uint8_t ea_addr[6]; 245 208 } ether_addr_t; 246 209
Note:
See TracChangeset
for help on using the changeset viewer.