Changeset 6843a9c in mainline for uspace/drv/nic/rtl8139/general.h
- Timestamp:
- 2012-06-29T13:02:14Z (13 years ago)
- 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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8139/general.h
rba72f2b r6843a9c 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2011 Jiri Michalec 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libc 30 * @{ 29 /** @file 30 * 31 * General functions and structures used in rtl8139 driver 31 32 */ 32 33 33 /** @file 34 * ARP module messages. 35 * @see arp_interface.h 36 */ 34 #ifndef RTL8139_GENERAL_H_ 35 #define RTL8139_GENERAL_H_ 37 36 38 #ifndef LIBC_ARP_MESSAGES_ 39 #define LIBC_ARP_MESSAGES_ 37 #include <unistd.h> 40 38 41 #include <ipc/net.h> 39 /** Number of microseconds in second */ 40 #define RTL8139_USEC_IN_SEC 1000000 42 41 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 */ 43 typedef 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; 66 59 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 /*@}*/ 60 extern void *rtl8139_memcpy_wrapped(void *, const void *, size_t, size_t, 61 size_t); 62 extern int rtl8139_timer_act_init(rtl8139_timer_act_t *, uint32_t, 63 const struct timeval *); 64 extern int rtl8139_timer_act_step(rtl8139_timer_act_t *, uint32_t *); 78 65 79 66 #endif 80 81 /** @}82 */
Note:
See TracChangeset
for help on using the changeset viewer.