/* Convert wake-up controller (WUC) group to the corresponding wake-up edge sense register (WUESR). Return pointer to the register. */
static volatile uint8_t* wuesr(uint8_t grp)
/* Convert wake-up controller (WUC) group to the corresponding wake-up edge sense register (WUESR). Return pointer to the register. */
static volatile uint8_t* wuesr(uint8_t grp)
{
	return (grp <= 4) ?
			(volatile uint8_t *)(IT8XXX2_WUC_WUESR1 + grp-1) :
			(volatile uint8_t *)(IT8XXX2_WUC_WUESR5 + 4*(grp-5));
}