How does sdRead() work?

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

liamstask
Posts: 34
Joined: Wed Dec 08, 2010 5:42 pm

Re: How does sdRead() work?

Post by liamstask »

Great! Thanks for setting it up.
Dave_fr
Posts: 27
Joined: Thu Feb 17, 2011 11:26 pm

Re: How does sdRead() work?

Post by Dave_fr »

The serial driver implicitly broadcasts event when it has something to report, for example:
- Data in the receive queue.
- Transmit queue empty.
- Receive errors.


How do you access these events ? I'm looking for "serial driver event source" and I can't find anything appart from :
void sdIncomingDataI ( SerialDriver * sdp, uint8_t b)
Handles incoming data.
This function must be called from the input interrupt service routine in order to enqueue incoming data and generate the related events.


I'm using an stm32 does that mean that, in order to generate serial events, I have to modified the STM32 serial driver code by calling the following function in the serial interrupt service routine ?

What I would like to do is the following thing : firing a decoding thread when serial gets receives a new byte.

Best regards,

Dave
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: How does sdRead() work?

Post by Giovanni »

Hi,

I posted an example of serial events usage in this thread: viewtopic.php?f=2&t=69

Giovanni
Post Reply