Ignore:
Timestamp:
2011-10-21T16:48:27Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9f351c8
Parents:
1a11a16
Message:

sb16: Add lazy buffer initialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/sb16/dma_controller.c

    r1a11a16 r01aef43  
    151151
    152152typedef struct dma_controller {
    153         dma_channel_t channel[8];
     153        dma_channel_t channels[8];
    154154        dma_page_regs_t *page_table;
    155155        dma_controller_regs_first_t *first;
     
    157157} dma_controller_t;
    158158
    159 static const dma_controller_t controller_8237 = {
    160         .channel = {
     159static dma_controller_t controller_8237 = {
     160        .channels = {
    161161            { (uint8_t*)0x00, (uint8_t*)0x01, (uint8_t*)0x87 },
    162162            { (uint8_t*)0x02, (uint8_t*)0x03, (uint8_t*)0x83 },
     
    209209        /* Low byte */
    210210        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);
    212212
    213213        /* High byte */
    214214        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);
    216216
    217217        /* Page address - third byte */
    218218        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);
    220220
    221221        /* Set size -- reset flip-flop */
     
    224224        /* Low byte */
    225225        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);
    227227
    228228        /* High byte */
    229229        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);
    231231
    232232        /* Unmask DMA request */
     
    253253        /* Low byte */
    254254        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);
    256256
    257257        /* High byte */
    258258        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);
    260260
    261261        /* Page address - third byte */
    262262        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);
    264264
    265265        /* Set size -- reset flip-flop */
     
    268268        /* Low byte */
    269269        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);
    271271
    272272        /* High byte */
    273273        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);
    275275
    276276        /* Unmask DMA request */
Note: See TracChangeset for help on using the changeset viewer.