Changeset 74864ac in mainline for uspace/srv/hw/netif/dp8390/ne2000.c
- 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/ne2000.c
rfc23ef6 r74864ac 16 16 #define N 100 17 17 18 typedef int (*testf_t)(dpeth_t *dep, int pos, u 8_t *pat);18 typedef int (*testf_t)(dpeth_t *dep, int pos, uint8_t *pat); 19 19 20 20 /** Data patterns */ 21 u 8_t pat0[] = {0x00, 0x00, 0x00, 0x00};22 u 8_t pat1[] = {0xFF, 0xFF, 0xFF, 0xFF};23 u 8_t pat2[] = {0xA5, 0x5A, 0x69, 0x96};24 u 8_t pat3[] = {0x96, 0x69, 0x5A, 0xA5};21 uint8_t pat0[] = {0x00, 0x00, 0x00, 0x00}; 22 uint8_t pat1[] = {0xFF, 0xFF, 0xFF, 0xFF}; 23 uint8_t pat2[] = {0xA5, 0x5A, 0x69, 0x96}; 24 uint8_t pat3[] = {0x96, 0x69, 0x5A, 0xA5}; 25 25 26 26 /** Tests 8 bit NE2000 network interface. … … 29 29 * @param[in] pat The data pattern to be written. 30 30 * @returns True on success. 31 * @returns FALSEotherwise.32 */ 33 static int test_8(dpeth_t *dep, int pos, u 8_t *pat);31 * @returns false otherwise. 32 */ 33 static int test_8(dpeth_t *dep, int pos, uint8_t *pat); 34 34 35 35 /** Tests 16 bit NE2000 network interface. … … 38 38 * @param[in] pat The data pattern to be written. 39 39 * @returns True on success. 40 * @returns FALSEotherwise.41 */ 42 static int test_16(dpeth_t *dep, int pos, u 8_t *pat);40 * @returns false otherwise. 41 */ 42 static int test_16(dpeth_t *dep, int pos, uint8_t *pat); 43 43 44 44 /** Stops the NE2000 network interface. … … 178 178 } 179 179 180 static int test_8(dpeth_t *dep, int pos, u 8_t *pat)181 { 182 u 8_t buf[4];180 static int test_8(dpeth_t *dep, int pos, uint8_t *pat) 181 { 182 uint8_t buf[4]; 183 183 int i; 184 184 … … 217 217 } 218 218 219 static int test_16(dpeth_t *dep, int pos, u 8_t *pat)220 { 221 u 8_t buf[4];219 static int test_16(dpeth_t *dep, int pos, uint8_t *pat) 220 { 221 uint8_t buf[4]; 222 222 int i; 223 223 … … 232 232 233 233 for (i = 0; i < 4; i += 2) 234 outw_ne(dep, NE_DATA, *(u 16_t *)(pat + i));234 outw_ne(dep, NE_DATA, *(uint16_t *)(pat + i)); 235 235 236 236 for (i = 0; i < N; i++) { … … 251 251 252 252 for (i = 0; i < 4; i += 2) 253 *(u 16_t *)(buf + i) = inw_ne(dep, NE_DATA);253 *(uint16_t *)(buf + i) = inw_ne(dep, NE_DATA); 254 254 255 255 return (memcmp(buf, pat, 4) == 0);
Note:
See TracChangeset
for help on using the changeset viewer.