/* Enable the option to clear the counter on an AST alarm.  */
void ast_enable_counter_clear_on_alarm(Ast *ast, uint8_t alarm_channel)
/* Enable the option to clear the counter on an AST alarm.  */
void ast_enable_counter_clear_on_alarm(Ast *ast, uint8_t alarm_channel)
{
	while (ast_is_busy(ast)) {
	}
	ast->AST_CR
		|= (alarm_channel ? 0 : AST_CR_CA0);
	while (ast_is_busy(ast)) {
	}
}