/* System aon peripheral reset. 
Use this function to reset system aon peripheral. */
enum status_code system_peripheral_aon_reset(enum system_peripheral_aon peripheral_aon)
/* System aon peripheral reset. 
Use this function to reset system aon peripheral. */
enum status_code system_peripheral_aon_reset(enum system_peripheral_aon peripheral_aon)
{
	switch (peripheral_aon) {
		case PERIPHERAL_AON_SLEEP_TIMER:
			AON_GP_REGS0->AON_GLOBAL_RESET.reg &= \
				~AON_GP_REGS_AON_GLOBAL_RESET_SLEEP_TIMER_RSTN;
			while (!AON_SLEEP_TIMER0->CONTROL.bit.SLEEP_TIMER_NOT_ACTIVE);
			AON_GP_REGS0->AON_GLOBAL_RESET.reg |= \
				AON_GP_REGS_AON_GLOBAL_RESET_SLEEP_TIMER_RSTN;
		break;
		default:
		return STATUS_ERR_INVALID_ARG;
	}
	return STATUS_OK;
}