Hi All,
I have been busy trying to write a driver for a Serial based sensor (Windsonic) and have some basic questions.
First of all its actually pretty tricky writing a fully "encapsulated" driver without access to the "user context".
Since quick execution times are critical for interrupt driven routines but these tend to be highly used in order to keep all the driver logic within the driver itself. So one ends up with all sorts of Timers, Tickers etc ....
Is the alternative to split the driver up and keep the serial comms in the main loop and simply pass/receive data to the driver? i.e. the sensor driver does not really know how its getting and sending the data?
To make matters harder my particular sensor seems to only tolerate character to character input with pauses between each character.. so I need to space the sending of every character to the sensor by like 100ms (as if a user was entering it on his keyboard)
anyone have any thoughts or tips on this?
Thanks,
Serge
Hi All,
I have been busy trying to write a driver for a Serial based sensor (Windsonic) and have some basic questions.
First of all its actually pretty tricky writing a fully "encapsulated" driver without access to the "user context". Since quick execution times are critical for interrupt driven routines but these tend to be highly used in order to keep all the driver logic within the driver itself. So one ends up with all sorts of Timers, Tickers etc ....
Is the alternative to split the driver up and keep the serial comms in the main loop and simply pass/receive data to the driver? i.e. the sensor driver does not really know how its getting and sending the data?
To make matters harder my particular sensor seems to only tolerate character to character input with pauses between each character.. so I need to space the sending of every character to the sensor by like 100ms (as if a user was entering it on his keyboard)
anyone have any thoughts or tips on this?
Thanks, Serge