Changeset 74864ac in mainline for uspace/srv/hw/netif/dp8390/ne2000.c


Ignore:
Timestamp:
2011-01-06T15:28:51Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0777f4c5
Parents:
fc23ef6
Message:

cstyle & clutter removal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/netif/dp8390/ne2000.c

    rfc23ef6 r74864ac  
    1616#define N  100
    1717
    18 typedef int (*testf_t)(dpeth_t *dep, int pos, u8_t *pat);
     18typedef int (*testf_t)(dpeth_t *dep, int pos, uint8_t *pat);
    1919
    2020/** Data patterns */
    21 u8_t pat0[] = {0x00, 0x00, 0x00, 0x00};
    22 u8_t pat1[] = {0xFF, 0xFF, 0xFF, 0xFF};
    23 u8_t pat2[] = {0xA5, 0x5A, 0x69, 0x96};
    24 u8_t pat3[] = {0x96, 0x69, 0x5A, 0xA5};
     21uint8_t pat0[] = {0x00, 0x00, 0x00, 0x00};
     22uint8_t pat1[] = {0xFF, 0xFF, 0xFF, 0xFF};
     23uint8_t pat2[] = {0xA5, 0x5A, 0x69, 0x96};
     24uint8_t pat3[] = {0x96, 0x69, 0x5A, 0xA5};
    2525
    2626/** Tests 8 bit NE2000 network interface.
     
    2929 *  @param[in] pat The data pattern to be written.
    3030 *  @returns True on success.
    31  *  @returns FALSE otherwise.
    32  */
    33 static int test_8(dpeth_t *dep, int pos, u8_t *pat);
     31 *  @returns false otherwise.
     32 */
     33static int test_8(dpeth_t *dep, int pos, uint8_t *pat);
    3434
    3535/** Tests 16 bit NE2000 network interface.
     
    3838 *  @param[in] pat The data pattern to be written.
    3939 *  @returns True on success.
    40  *  @returns FALSE otherwise.
    41  */
    42 static int test_16(dpeth_t *dep, int pos, u8_t *pat);
     40 *  @returns false otherwise.
     41 */
     42static int test_16(dpeth_t *dep, int pos, uint8_t *pat);
    4343
    4444/** Stops the NE2000 network interface.
     
    178178}
    179179
    180 static int test_8(dpeth_t *dep, int pos, u8_t *pat)
    181 {
    182         u8_t buf[4];
     180static int test_8(dpeth_t *dep, int pos, uint8_t *pat)
     181{
     182        uint8_t buf[4];
    183183        int i;
    184184       
     
    217217}
    218218
    219 static int test_16(dpeth_t *dep, int pos, u8_t *pat)
    220 {
    221         u8_t buf[4];
     219static int test_16(dpeth_t *dep, int pos, uint8_t *pat)
     220{
     221        uint8_t buf[4];
    222222        int i;
    223223       
     
    232232       
    233233        for (i = 0; i < 4; i += 2)
    234                 outw_ne(dep, NE_DATA, *(u16_t *)(pat + i));
     234                outw_ne(dep, NE_DATA, *(uint16_t *)(pat + i));
    235235       
    236236        for (i = 0; i < N; i++) {
     
    251251       
    252252        for (i = 0; i < 4; i += 2)
    253                 *(u16_t *)(buf + i) = inw_ne(dep, NE_DATA);
     253                *(uint16_t *)(buf + i) = inw_ne(dep, NE_DATA);
    254254       
    255255        return (memcmp(buf, pat, 4) == 0);
Note: See TracChangeset for help on using the changeset viewer.