Commit 3dfeabde authored by Martin Vítek's avatar Martin Vítek

Working interrupt from ENC28J60

parent 3b8b5cff
......@@ -134,9 +134,7 @@ namespace ENC28J60_namespace
interrupt_flags flags;
flags.value = read_control_register(EIR);
uint8_t flags_to_clear = 0;
print_interrupt_flags(flags);
if (flags.bit.rxerif)
{
......
......@@ -135,13 +135,13 @@ void System::init_interrupts()
void System::init_eic()
{
//EXTINT[7] both edges, filter enabled
EIC->CONFIG[0].reg = EIC_CONFIG_SENSE7_BOTH | EIC_CONFIG_FILTEN7;
EIC->CONFIG[0].reg |= EIC_CONFIG_SENSE7_BOTH | EIC_CONFIG_FILTEN7;
//EXTINT[10] falling edge, filter enabled
EIC->CONFIG[1].reg = EIC_CONFIG_SENSE2_FALL | EIC_CONFIG_FILTEN2;
EIC->CONFIG[1].reg |= EIC_CONFIG_SENSE2_FALL | EIC_CONFIG_FILTEN2;
//EXTINT[12] both edges, filter enabled
EIC->CONFIG[1].reg = EIC_CONFIG_SENSE4_BOTH | EIC_CONFIG_FILTEN4;
EIC->CONFIG[1].reg |= EIC_CONFIG_SENSE4_BOTH | EIC_CONFIG_FILTEN4;
//Enable interrupts EXTINT[7], EXTINT[12]
EIC->INTENSET.reg = EIC_INTENSET_EXTINT7 | EIC_INTENSET_EXTINT10 | EIC_INTENSET_EXTINT12;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment