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/dp8390_port.h

    rfc23ef6 r74864ac  
    4444#include <sys/types.h>
    4545
    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 params
    51 
    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 
    6046/** Compares two memory blocks.
    6147 *  @param[in] first The first memory block.
     
    6652 *  @returns 1 if the second is greater than the first.
    6753 */
    68 #define memcmp(first, second, size)     bcmp((char *) (first), (char *) (second), (size))
     54#define memcmp(first, second, size)  bcmp((char *) (first), (char *) (second), (size))
    6955
    7056/** Reads 1 byte.
     
    7258 *  @returns The read value.
    7359 */
    74 #define inb(port)       pio_read_8((ioport8_t *) (port))
     60#define inb(port)  pio_read_8((ioport8_t *) (port))
    7561
    7662/** Reads 1 word (2 bytes).
     
    7864 *  @returns The read value.
    7965 */
    80 #define inw(port)       pio_read_16((ioport16_t *) (port))
     66#define inw(port)  pio_read_16((ioport16_t *) (port))
    8167
    8268/** Writes 1 byte.
     
    8470 *  @param[in] value The value to be written.
    8571 */
    86 #define outb(port, value)       pio_write_8((ioport8_t *) (port), (value))
     72#define outb(port, value)  pio_write_8((ioport8_t *) (port), (value))
    8773
    8874/** Writes 1 word (2 bytes).
     
    9076 *  @param[in] value The value to be written.
    9177 */
    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))
    9879
    9980/** Copies a memory block.
     
    141122#define do_vir_outsw(port, proc, src, bytes)    outsw((port), (void *)(src), (bytes))
    142123
    143 /* com.h */
    144124/* 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
    165130/** Type definition of a port.
    166131 */
    167132typedef long port_t;
    168133
    169 /* dl_eth.h */
    170134/** Ethernet statistics.
    171135 */
    172 typedef struct eth_stat
    173 {
     136typedef struct eth_stat {
    174137        /** Number of receive errors.
    175138         */
     
    242205        /** Address data.
    243206         */
    244         u8_t ea_addr[6];
     207        uint8_t ea_addr[6];
    245208} ether_addr_t;
    246209
Note: See TracChangeset for help on using the changeset viewer.