/* Fix sconfig's bus width according to at_dmac. 1 byte -> 0, 2 bytes -> 1, 4 bytes -> 2, 8bytes -> 3  */
static uint32_t convert_buswidth(enum dma_slave_buswidth addr_width)
/* Fix sconfig's bus width according to at_dmac. 1 byte -> 0, 2 bytes -> 1, 4 bytes -> 2, 8bytes -> 3  */
static uint32_t convert_buswidth(enum dma_slave_buswidth addr_width)
{
    if (addr_width > DMA_SLAVE_BUSWIDTH_8_BYTES)
    {
        return 0;
    }
    switch (addr_width)
    {
        case DMA_SLAVE_BUSWIDTH_2_BYTES:
            return 1;
        case DMA_SLAVE_BUSWIDTH_4_BYTES:
            return 2;
        case DMA_SLAVE_BUSWIDTH_8_BYTES:
            return 3;
        default:
            return 0;
    }
}