Exemplo n.º 1
0
/**
 * This function is used to lock access to critical sections when lwipopt.h
 * defines SYS_LIGHTWEIGHT_PROT. It disables interrupts and returns a value
 * indicating the interrupt enable state when the function entered. This
 * value must be passed back on the matching call to sys_arch_unprotect().
 *
 * @return the interrupt level when the function was entered.
 */
sys_prot_t
sys_arch_protect(void)
{
  volatile sys_prot_t status;
  status = (IntMasterStatusGet() & 0xFF);

  IntMasterIRQDisable();
  return status;
}
Exemplo n.º 2
0
unsigned char IntDisable(void)
{
	unsigned char status;

	/* Reads the current status.*/
	status = (IntMasterStatusGet() & 0xFF);

	/* Disable the Interrupts.*/
	IntMasterIRQDisable();

	return status;
}