/* Set respective fields in the channel's TCD: SADDR, SOFF, ATTR, SLAST. These fields configure the DMA channel source.  */
int kinetis_dma_ch_set_src(int ch, u32 saddr, s16 soff, u8 bitwidth, s32 slast)
/* Set respective fields in the channel's TCD: SADDR, SOFF, ATTR, SLAST. These fields configure the DMA channel source.  */
int kinetis_dma_ch_set_src(int ch, u32 saddr, s16 soff, u8 bitwidth, s32 slast)
{
	DMAAPI_LOCKED_BEGIN
	KINETIS_DMA->tcd[ch].attr =
		(KINETIS_DMA->tcd[ch].attr & ~KINETIS_TCD_ATTR_SSIZE_MSK) |
		(bitwidth << KINETIS_TCD_ATTR_SSIZE_BITS);
	KINETIS_DMA->tcd[ch].saddr = saddr;
	KINETIS_DMA->tcd[ch].soff = soff;
	KINETIS_DMA->tcd[ch].slast = slast;
	DMAAPI_LOCKED_END
}