avoid code size explosions when setting interrupts on dma config

apparently compilers can't see through member function pointers just as
well as i had assumed ...
fix transfer count calculation

transfers are counted in peripheral writes, so we want to to do
buffer_items * buffer_item_size / sizeof(peripheral_reg) writes, not the
other way around