Hi there!
Does anybody known how to code an interrupt driven driver using Microdevt toolkit (www.kw-net.com) ?
I am trying to develop a simple driver on my atmega328 that enqueues a bitstream from an other uC. The bitstream is read on an input pin and then processed if a certain amount of data has been read. The length of the stream is in the first byte.
The interrupt driven approach proposed in their user guide seems like the perfect solution: if there is data available I read it, if not I sleep. And if there is too much data then it is enqueued for later processing. In Microdevt, they compare this method of doing to the top/bottom halves of an interrupt like in a linux driver. So my problem is that I don't know where exactly I should free the ring buffer entries used to write/read data. If I do it in the interrupt handler is crashes badly...
Thanks!
Does anybody known how to code an interrupt driven driver using Microdevt toolkit (www.kw-net.com) ?
I am trying to develop a simple driver on my atmega328 that enqueues a bitstream from an other uC. The bitstream is read on an input pin and then processed if a certain amount of data has been read. The length of the stream is in the first byte.
The interrupt driven approach proposed in their user guide seems like the perfect solution: if there is data available I read it, if not I sleep. And if there is too much data then it is enqueued for later processing. In Microdevt, they compare this method of doing to the top/bottom halves of an interrupt like in a linux driver. So my problem is that I don't know where exactly I should free the ring buffer entries used to write/read data. If I do it in the interrupt handler is crashes badly...
Thanks!