Changeset 01aef43 in mainline for uspace/drv/audio/sb16/dma_controller.c
- Timestamp:
- 2011-10-21T16:48:27Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9f351c8
- Parents:
- 1a11a16
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/dma_controller.c
r1a11a16 r01aef43 151 151 152 152 typedef struct dma_controller { 153 dma_channel_t channel [8];153 dma_channel_t channels[8]; 154 154 dma_page_regs_t *page_table; 155 155 dma_controller_regs_first_t *first; … … 157 157 } dma_controller_t; 158 158 159 static constdma_controller_t controller_8237 = {160 .channel = {159 static dma_controller_t controller_8237 = { 160 .channels = { 161 161 { (uint8_t*)0x00, (uint8_t*)0x01, (uint8_t*)0x87 }, 162 162 { (uint8_t*)0x02, (uint8_t*)0x03, (uint8_t*)0x83 }, … … 209 209 /* Low byte */ 210 210 value = pa & 0xff; 211 pio_write_8(controller->channel [channel].offset_reg_address, value);211 pio_write_8(controller->channels[channel].offset_reg_address, value); 212 212 213 213 /* High byte */ 214 214 value = (pa >> 8) & 0xff; 215 pio_write_8(controller->channel [channel].offset_reg_address, value);215 pio_write_8(controller->channels[channel].offset_reg_address, value); 216 216 217 217 /* Page address - third byte */ 218 218 value = (pa >> 16) & 0xff; 219 pio_write_8(controller->channel [channel].offset_reg_address, value);219 pio_write_8(controller->channels[channel].offset_reg_address, value); 220 220 221 221 /* Set size -- reset flip-flop */ … … 224 224 /* Low byte */ 225 225 value = size & 0xff; 226 pio_write_8(controller->channel [channel].offset_reg_address, value);226 pio_write_8(controller->channels[channel].offset_reg_address, value); 227 227 228 228 /* High byte */ 229 229 value = (size >> 8) & 0xff; 230 pio_write_8(controller->channel [channel].offset_reg_address, value);230 pio_write_8(controller->channels[channel].offset_reg_address, value); 231 231 232 232 /* Unmask DMA request */ … … 253 253 /* Low byte */ 254 254 value = pa & 0xff; 255 pio_write_8(controller->channel [channel].offset_reg_address, value);255 pio_write_8(controller->channels[channel].offset_reg_address, value); 256 256 257 257 /* High byte */ 258 258 value = (pa >> 8) & 0xff; 259 pio_write_8(controller->channel [channel].offset_reg_address, value);259 pio_write_8(controller->channels[channel].offset_reg_address, value); 260 260 261 261 /* Page address - third byte */ 262 262 value = (pa >> 16) & 0xff; 263 pio_write_8(controller->channel [channel].offset_reg_address, value);263 pio_write_8(controller->channels[channel].offset_reg_address, value); 264 264 265 265 /* Set size -- reset flip-flop */ … … 268 268 /* Low byte */ 269 269 value = size & 0xff; 270 pio_write_8(controller->channel [channel].offset_reg_address, value);270 pio_write_8(controller->channels[channel].offset_reg_address, value); 271 271 272 272 /* High byte */ 273 273 value = (size >> 8) & 0xff; 274 pio_write_8(controller->channel [channel].offset_reg_address, value);274 pio_write_8(controller->channels[channel].offset_reg_address, value); 275 275 276 276 /* Unmask DMA request */
Note:
See TracChangeset
for help on using the changeset viewer.