Changeset 6843a9c in mainline for uspace/drv/nic/rtl8139/general.h


Ignore:
Timestamp:
2012-06-29T13:02:14Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
722912e
Parents:
ba72f2b (diff), 0bbd13e (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.
Message:

Merge mainline changes

Trivial conflicts.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8139/general.h

    rba72f2b r6843a9c  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2011 Jiri Michalec
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libc
    30  * @{
     29/** @file
     30 *
     31 * General functions and structures used in rtl8139 driver
    3132 */
    3233
    33 /** @file
    34  * ARP module messages.
    35  * @see arp_interface.h
    36  */
     34#ifndef RTL8139_GENERAL_H_
     35#define RTL8139_GENERAL_H_
    3736
    38 #ifndef LIBC_ARP_MESSAGES_
    39 #define LIBC_ARP_MESSAGES_
     37#include <unistd.h>
    4038
    41 #include <ipc/net.h>
     39/** Number of microseconds in second */
     40#define RTL8139_USEC_IN_SEC  1000000
    4241
    43 /** ARP module messages. */
    44 typedef enum {
    45         /** Clean cache message.
    46          * @see arp_clean_cache()
    47          */
    48         NET_ARP_CLEAN_CACHE = NET_ARP_FIRST,
    49         /** Clear address cache message.
    50          * @see arp_clear_address_msg()
    51          */
    52         NET_ARP_CLEAR_ADDRESS,
    53         /** Clear device cache message.
    54          * @see arp_clear_device_req()
    55          */
    56         NET_ARP_CLEAR_DEVICE,
    57         /** New device message.
    58          * @see arp_device_req()
    59          */
    60         NET_ARP_DEVICE,
    61         /** Address translation message.
    62          * @see arp_translate_req()
    63          */
    64         NET_ARP_TRANSLATE
    65 } arp_messages;
     42/** Structure for HW timer control */
     43typedef struct {
     44        /** Register value set in the last timer period */
     45        uint32_t last_val;
     46       
     47        /** Register value set in the common timer period */
     48        uint32_t full_val;
     49       
     50        /** Amount of full register periods in timer period */
     51        size_t full_skips;
     52       
     53        /** Remaining full register periods to the next period end */
     54        size_t full_skips_remains;
     55       
     56        /** Mark if there is a last run */
     57        int last_run;
     58} rtl8139_timer_act_t;
    6659
    67 /** @name ARP specific message parameters definitions */
    68 /*@{*/
    69 
    70 /** Return the protocol service message parameter.
    71  *
    72  * @param[in] call Message call structure.
    73  *
    74  */
    75 #define ARP_GET_NETIF(call) ((services_t) IPC_GET_ARG2(call))
    76 
    77 /*@}*/
     60extern void *rtl8139_memcpy_wrapped(void *, const void *, size_t, size_t,
     61    size_t);
     62extern int rtl8139_timer_act_init(rtl8139_timer_act_t *, uint32_t,
     63    const struct timeval *);
     64extern int rtl8139_timer_act_step(rtl8139_timer_act_t *, uint32_t *);
    7865
    7966#endif
    80 
    81 /** @}
    82  */
Note: See TracChangeset for help on using the changeset viewer.