fivdi / i2c-bus

I2C serial bus access with Node.js
MIT License
348 stars 57 forks source link

Interrupt driven? #49

Closed GeoffreyPlitt closed 6 years ago

GeoffreyPlitt commented 6 years ago

Are the async reads interrupt-driven?

fivdi commented 6 years ago

It depends on the underlying Linux I2C driver. If the I2C driver is interrupt driven the the async reads are interrupt driven. If the I2C driver is DMA driven the async reads are DMA driven. The same applies to sync reads.

fivdi commented 6 years ago

And if the I2C driver is software driven the async reads are software driven.

Irrespective of how the driver works (interrupt, DMA, software) the async methods will not block the main JavaScript thread.

GeoffreyPlitt commented 6 years ago

Awesome, thanks!