Changeset 6843a9c in mainline for uspace/lib/c/include/device


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.

Location:
uspace/lib/c/include/device
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/device/hw_res.h

    rba72f2b r6843a9c  
    4040#include <bool.h>
    4141
     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
    4250/** HW resource provider interface */
    4351typedef enum {
     
    8088                        int irq;
    8189                } interrupt;
    82 
     90               
    8391                union {
    84                         int dma8;
    85                         int dma16;
     92                        unsigned int dma8;
     93                        unsigned int dma16;
    8694                } dma_channel;
    8795        } res;
     
    106114extern bool hw_res_enable_interrupt(async_sess_t *);
    107115
    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);
     116extern int hw_res_dma_channel_setup(async_sess_t *, unsigned int, uint32_t,
     117    uint16_t, uint8_t);
    118118
    119119#endif
  • uspace/lib/c/include/device/hw_res_parsed.h

    rba72f2b r6843a9c  
    7878
    7979        /** Array of channels */
    80         int *channels;
     80        unsigned int *channels;
    8181} dma_list_t;
    8282
     
    101101        irq_list_t irqs;
    102102
     103        /** List of DMA channels */
     104        dma_list_t dma_channels;
     105       
    103106        /** List of DMA channels */
    104107        dma_list_t dma_channels;
  • uspace/lib/c/include/device/nic.h

    rba72f2b r6843a9c  
    3737
    3838#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>
    4241
    4342typedef enum {
    4443        NIC_SEND_MESSAGE = 0,
    45         NIC_CONNECT_TO_NIL,
     44        NIC_CALLBACK_CREATE,
    4645        NIC_GET_STATE,
    4746        NIC_SET_STATE,
     
    8584} nic_funcs_t;
    8685
    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);
     86typedef enum {
     87        NIC_EV_ADDR_CHANGED = IPC_FIRST_USER_METHOD,
     88        NIC_EV_RECEIVED,
     89        NIC_EV_DEVICE_STATE
     90} nic_event_t;
     91
     92extern int nic_send_frame(async_sess_t *, void *, size_t);
     93extern int nic_callback_create(async_sess_t *, async_client_conn_t, void *);
    8994extern int nic_get_state(async_sess_t *, nic_device_state_t *);
    9095extern int nic_set_state(async_sess_t *, nic_device_state_t);
     
    127132extern int nic_vlan_get_mask(async_sess_t *, nic_vlan_mask_t *);
    128133extern 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);
     134extern int nic_vlan_set_tag(async_sess_t *, uint16_t, bool, bool);
    130135
    131136extern int nic_wol_virtue_add(async_sess_t *, nic_wv_type_t, const void *,
  • uspace/lib/c/include/device/pci.h

    rba72f2b r6843a9c  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2011 Jiri Michalec
    33 * All rights reserved.
    44 *
     
    3030 * @{
    3131 */
    32 
    3332/** @file
    34  * Networking subsystem central module messages.
    35  * @see net_interface.h
    3633 */
    3734
    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_
    4037
    41 #include <ipc/net.h>
     38#include <async.h>
    4239
    43 /** Networking subsystem central module messages. */
     40#define PCI_DEVICE_ID  0x02
     41
    4442typedef 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
     52extern int pci_config_space_read_8(async_sess_t *, uint32_t, uint8_t *);
     53extern int pci_config_space_read_16(async_sess_t *, uint32_t, uint16_t *);
     54extern int pci_config_space_read_32(async_sess_t *, uint32_t, uint32_t *);
     55
     56extern int pci_config_space_write_8(async_sess_t *, uint32_t, uint8_t);
     57extern int pci_config_space_write_16(async_sess_t *, uint32_t, uint16_t);
     58extern int pci_config_space_write_32(async_sess_t *, uint32_t, uint32_t);
    6059
    6160#endif
Note: See TracChangeset for help on using the changeset viewer.