/* Convert wake-up controller (WUC) group to the corresponding wake-up edge mode register (WUEMR). Return pointer to the register. */
static volatile uint8_t* wuemr(uint8_t grp)
/* Convert wake-up controller (WUC) group to the corresponding wake-up edge mode register (WUEMR). Return pointer to the register. */
static volatile uint8_t* wuemr(uint8_t grp)
{
	return (grp <= 4) ?
			(volatile uint8_t *)(IT8XXX2_WUC_WUEMR1 + grp-1) :
			(volatile uint8_t *)(IT8XXX2_WUC_WUEMR5 + 4*(grp-5));
}