upd7810: Some fixes and code simplification

This patch-set fixes the ADC and ETIMER interrupts. In addition, it removes some code duplication.