dma: add error check on peripheral to peripheral
dma: add error check on peripheral to peripheral

add dma direction check for dma_sam0

Signed-off-by: Hake Huang <141c0384c6b2febca367ae94dc4dc40a33a7ba79@oss.nxp.com>

nashif/zephyr,Vudentz/zephyr,galak/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,galak/zephyr,nashif/zephyr,finikorg/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr