Changeset d9cf684a in mainline for uspace/lib/c
- Timestamp:
- 2011-12-22T14:10:31Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fe5e9629
- Parents:
- a438de48
- Location:
- uspace/lib/c/include/device
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/device/hw_res.h
ra438de48 rd9cf684a 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 { 44 52 HW_RES_GET_RESOURCE_LIST = 0, 45 HW_RES_ENABLE_INTERRUPT 53 HW_RES_ENABLE_INTERRUPT, 54 HW_RES_DMA_CHANNEL_SETUP, 46 55 } hw_res_method_t; 47 56 … … 50 59 INTERRUPT, 51 60 IO_RANGE, 52 MEM_RANGE 61 MEM_RANGE, 62 DMA_CHANNEL_8, 63 DMA_CHANNEL_16, 53 64 } hw_res_type_t; 54 65 … … 77 88 int irq; 78 89 } interrupt; 90 91 union { 92 unsigned int dma8; 93 unsigned int dma16; 94 } dma_channel; 79 95 } res; 80 96 } hw_resource_t; … … 98 114 extern bool hw_res_enable_interrupt(async_sess_t *); 99 115 116 extern int hw_res_dma_channel_setup(async_sess_t *, unsigned int, uint32_t, 117 uint16_t, uint8_t); 118 100 119 #endif 101 120 -
uspace/lib/c/include/device/hw_res_parsed.h
ra438de48 rd9cf684a 72 72 } irq_list_t; 73 73 74 /** List of ISA DMA channels */ 75 typedef struct dma_list { 76 /** Channel count */ 77 size_t count; 78 79 /** Array of channels */ 80 unsigned int *channels; 81 } dma_list_t; 82 74 83 /** List of memory areas */ 75 84 typedef struct addr_range_list { … … 91 100 /** List of IRQs */ 92 101 irq_list_t irqs; 102 103 /** List of DMA channels */ 104 dma_list_t dma_channels; 93 105 94 106 /** List of memory areas */ … … 113 125 free(list->io_ranges.ranges); 114 126 free(list->mem_ranges.ranges); 127 free(list->dma_channels.channels); 115 128 116 129 bzero(list, sizeof(hw_res_list_parsed_t));
Note:
See TracChangeset
for help on using the changeset viewer.