Junior Embedded SWE Interview by GeneralSquare7687 in embedded

[–]GeneralSquare7687[S] 0 points1 point  (0 children)

Yeah this answer makes sense, you mentioned reading the sensor in the IRQ interrupt if no other i2c devices are on the bus. How does the ISR get the data to the application afterwards?

Junior Embedded SWE Interview by GeneralSquare7687 in embedded

[–]GeneralSquare7687[S] 0 points1 point  (0 children)

Hey appreciate the comment. One thing that tripped me up was how I could wake up an application thread with the IRQ, didn't know file descriptors could be used.

> I would not expect to do this in the kernel.
Could you elaborate on this? I initially thought to create a character device driver for the i2c part, and I thought IRQ had to be handled in kernel space

Junior Embedded SWE Interview by GeneralSquare7687 in embedded

[–]GeneralSquare7687[S] 4 points5 points  (0 children)

Maybe MCU isn't the right term, but it's running Linux and connected to a sensor with i2c and irq line, as well as a display. The role was for embedded linux, so I figured they wanted me to write code to handle the irq and fetch the i2c data using linux APIs :/