Changeset ea150dc6 in mainline
- Timestamp:
- 2012-06-29T13:46:20Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bd250b0f
- Parents:
- 722912e
- Location:
- uspace/drv/audio/sb16
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/main.c
r722912e rea150dc6 116 116 const size_t irq_cmd_count = sb16_irq_code_size(); 117 117 irq_cmd_t irq_cmds[irq_cmd_count]; 118 sb16_irq_code((void*)sb_regs, dma8, dma16, irq_cmds); 119 irq_code_t irq_code = { .cmdcount = irq_cmd_count, .cmds = irq_cmds }; 118 irq_pio_range_t irq_ranges[1]; 119 sb16_irq_code((void*)sb_regs, dma8, dma16, irq_cmds, irq_ranges); 120 121 irq_code_t irq_code = { 122 .cmdcount = irq_cmd_count, 123 .cmds = irq_cmds, 124 .rangecount = 1, 125 .ranges = irq_ranges 126 }; 120 127 121 128 ret = register_interrupt_handler(device, irq, irq_handler, &irq_code); -
uspace/drv/audio/sb16/sb16.c
r722912e rea150dc6 74 74 } 75 75 /*----------------------------------------------------------------------------*/ 76 void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[] )76 void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[], irq_pio_range_t ranges[]) 77 77 { 78 78 assert(regs); … … 81 81 memcpy(cmds, irq_cmds, sizeof(irq_cmds)); 82 82 cmds[0].addr = (void*)®isters->dsp_read_status; 83 ranges[0].base = (uintptr_t)registers; 84 ranges[0].size = sizeof(*registers); 83 85 if (dma16 > 4 && dma16 < 8) { 84 86 /* Valid dma16 */ -
uspace/drv/audio/sb16/sb16.h
r722912e rea150dc6 51 51 52 52 size_t sb16_irq_code_size(void); 53 void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[] );53 void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[], irq_pio_range_t ranges[]); 54 54 int sb16_init_sb16(sb16_t *sb, void *regs, size_t size, 55 55 ddf_dev_t *dev, int dma8, int dma16);
Note:
See TracChangeset
for help on using the changeset viewer.