ESP32: Add framework to assign a a peripheral to a CPU interrupt

This commit is contained in:
Gregory Nutt 2016-10-25 13:16:05 -06:00
parent 2d7b1ccdda
commit 6756b44dc3
2 changed files with 76 additions and 0 deletions

View File

@ -302,3 +302,44 @@ void esp32_free_edgeint(int cpuint)
g_edge_ints |= mask;
leave_critical_section(flags);
}
/****************************************************************************
* Name: esp32_attach_peripheral
*
* Description:
* Attach a peripheral interupt to a CPU interrupt.
*
* Input Parameters:
* cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU
* periphid - The peripheral number from ira.h to be assigned.
* cpuint - The CPU interrupt to receive the peripheral interrupt
*
* Returned Value:
* None
*
****************************************************************************/
void esp32_attach_peripheral(int cpu, int periphid, int cpuint)
{
# warning Missing logic
}
/****************************************************************************
* Name: esp32_detach_peripheral
*
* Description:
* Detach a peripheral interupt from a CPU interrupt.
*
* Input Parameters:
* cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU
* cpuint - The CPU interrupt to receive the peripheral interrupt
*
* Returned Value:
* None
*
****************************************************************************/
void esp32_detach_peripheral(int cpu, int cpuint)
{
# warning Missing logic
}

View File

@ -116,4 +116,39 @@ int esp32_alloc_edgeint(void);
void esp32_free_edgeint(int cpuint);
/****************************************************************************
* Name: esp32_attach_peripheral
*
* Description:
* Attach a peripheral interupt to a CPU interrupt.
*
* Input Parameters:
* cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU
* periphid - The peripheral number from ira.h to be assigned.
* cpuint - The CPU interrupt to receive the peripheral interrupt
*
* Returned Value:
* None
*
****************************************************************************/
void esp32_attach_peripheral(int cpu, int periphid, int cpuint);
/****************************************************************************
* Name: esp32_detach_peripheral
*
* Description:
* Detach a peripheral interupt from a CPU interrupt.
*
* Input Parameters:
* cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU
* cpuint - The CPU interrupt to receive the peripheral interrupt
*
* Returned Value:
* None
*
****************************************************************************/
void esp32_detach_peripheral(int cpu, int cpuint);
#endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_CPUINT_H */