/* Retrieve ordinal number of the given sercom hardware instance.  */
static uint8_t _sercom_get_hardware_index(const void *const hw)
/* Retrieve ordinal number of the given sercom hardware instance.  */
static uint8_t _sercom_get_hardware_index(const void *const hw)
{
	Sercom *const sercom_modules[] = SERCOM_INSTS;
	for (uint32_t i = 0; i < SERCOM_INST_NUM; i++) {
		if ((uint32_t)hw == (uint32_t)sercom_modules[i]) {
			return i;
		}
	}
	return 0;
}