Changeset 6843a9c in mainline for uspace/lib/c/include/device
- 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. - Location:
- uspace/lib/c/include/device
- Files:
-
- 3 edited
- 1 moved
-
hw_res.h (modified) (3 diffs)
-
hw_res_parsed.h (modified) (2 diffs)
-
nic.h (modified) (3 diffs)
-
pci.h (moved) (moved from uspace/lib/c/include/ipc/net_net.h ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/device/hw_res.h
rba72f2b r6843a9c 40 40 #include <bool.h> 41 41 42 #define DMA_MODE_ON_DEMAND 0 43 #define DMA_MODE_WRITE (1 << 2) 44 #define DMA_MODE_READ (1 << 3) 45 #define DMA_MODE_AUTO (1 << 4) 46 #define DMA_MODE_DOWN (1 << 5) 47 #define DMA_MODE_SINGLE (1 << 6) 48 #define DMA_MODE_BLOCK (1 << 7) 49 42 50 /** HW resource provider interface */ 43 51 typedef enum { … … 80 88 int irq; 81 89 } interrupt; 82 90 83 91 union { 84 int dma8;85 int dma16;92 unsigned int dma8; 93 unsigned int dma16; 86 94 } dma_channel; 87 95 } res; … … 106 114 extern bool hw_res_enable_interrupt(async_sess_t *); 107 115 108 #define DMA_MODE_WRITE (1 << 2) 109 #define DMA_MODE_READ (1 << 3) 110 #define DMA_MODE_AUTO (1 << 4) 111 #define DMA_MODE_DOWN (1 << 5) 112 #define DMA_MODE_SINGLE (1 << 6) 113 #define DMA_MODE_BLOCK (1 << 7) 114 #define DMA_MODE_ON_DEMAND (0) 115 116 extern int hw_res_dma_channel_setup(async_sess_t *, 117 unsigned, uint32_t, uint16_t, uint8_t); 116 extern int hw_res_dma_channel_setup(async_sess_t *, unsigned int, uint32_t, 117 uint16_t, uint8_t); 118 118 119 119 #endif -
uspace/lib/c/include/device/hw_res_parsed.h
rba72f2b r6843a9c 78 78 79 79 /** Array of channels */ 80 int *channels;80 unsigned int *channels; 81 81 } dma_list_t; 82 82 … … 101 101 irq_list_t irqs; 102 102 103 /** List of DMA channels */ 104 dma_list_t dma_channels; 105 103 106 /** List of DMA channels */ 104 107 dma_list_t dma_channels; -
uspace/lib/c/include/device/nic.h
rba72f2b r6843a9c 37 37 38 38 #include <async.h> 39 #include <net/device.h> 40 #include <net/packet.h> 41 #include <ipc/services.h> 39 #include <nic/nic.h> 40 #include <ipc/common.h> 42 41 43 42 typedef enum { 44 43 NIC_SEND_MESSAGE = 0, 45 NIC_C ONNECT_TO_NIL,44 NIC_CALLBACK_CREATE, 46 45 NIC_GET_STATE, 47 46 NIC_SET_STATE, … … 85 84 } nic_funcs_t; 86 85 87 extern int nic_send_message(async_sess_t *, packet_id_t); 88 extern int nic_connect_to_nil(async_sess_t *, services_t, nic_device_id_t); 86 typedef enum { 87 NIC_EV_ADDR_CHANGED = IPC_FIRST_USER_METHOD, 88 NIC_EV_RECEIVED, 89 NIC_EV_DEVICE_STATE 90 } nic_event_t; 91 92 extern int nic_send_frame(async_sess_t *, void *, size_t); 93 extern int nic_callback_create(async_sess_t *, async_client_conn_t, void *); 89 94 extern int nic_get_state(async_sess_t *, nic_device_state_t *); 90 95 extern int nic_set_state(async_sess_t *, nic_device_state_t); … … 127 132 extern int nic_vlan_get_mask(async_sess_t *, nic_vlan_mask_t *); 128 133 extern int nic_vlan_set_mask(async_sess_t *, const nic_vlan_mask_t *); 129 extern int nic_vlan_set_tag(async_sess_t *, uint16_t, int, int);134 extern int nic_vlan_set_tag(async_sess_t *, uint16_t, bool, bool); 130 135 131 136 extern int nic_wol_virtue_add(async_sess_t *, nic_wv_type_t, const void *, -
uspace/lib/c/include/device/pci.h
rba72f2b r6843a9c 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2011 Jiri Michalec 3 3 * All rights reserved. 4 4 * … … 30 30 * @{ 31 31 */ 32 33 32 /** @file 34 * Networking subsystem central module messages.35 * @see net_interface.h36 33 */ 37 34 38 #ifndef LIBC_ NET_NET_MESSAGES_H_39 #define LIBC_ NET_NET_MESSAGES_H_35 #ifndef LIBC_DEVICE_PCI_H_ 36 #define LIBC_DEVICE_PCI_H_ 40 37 41 #include < ipc/net.h>38 #include <async.h> 42 39 43 /** Networking subsystem central module messages. */ 40 #define PCI_DEVICE_ID 0x02 41 44 42 typedef enum { 45 /** Return general configuration 46 * @see net_get_conf_req() 47 */ 48 NET_NET_GET_CONF = NET_FIRST, 49 /** Return device specific configuration 50 * @see net_get_device_conf_req() 51 */ 52 NET_NET_GET_DEVICE_CONF, 53 /** Return number of mastered devices */ 54 NET_NET_GET_DEVICES_COUNT, 55 /** Return names and device IDs of all devices */ 56 NET_NET_GET_DEVICES, 57 /** Notify the networking service about a ready device */ 58 NET_NET_DRIVER_READY 59 } net_messages; 43 IPC_M_CONFIG_SPACE_READ_8, 44 IPC_M_CONFIG_SPACE_READ_16, 45 IPC_M_CONFIG_SPACE_READ_32, 46 47 IPC_M_CONFIG_SPACE_WRITE_8, 48 IPC_M_CONFIG_SPACE_WRITE_16, 49 IPC_M_CONFIG_SPACE_WRITE_32 50 } pci_dev_iface_funcs_t; 51 52 extern int pci_config_space_read_8(async_sess_t *, uint32_t, uint8_t *); 53 extern int pci_config_space_read_16(async_sess_t *, uint32_t, uint16_t *); 54 extern int pci_config_space_read_32(async_sess_t *, uint32_t, uint32_t *); 55 56 extern int pci_config_space_write_8(async_sess_t *, uint32_t, uint8_t); 57 extern int pci_config_space_write_16(async_sess_t *, uint32_t, uint16_t); 58 extern int pci_config_space_write_32(async_sess_t *, uint32_t, uint32_t); 60 59 61 60 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
