Ive got all the SD-Card running nicely, but it was based on an example where all the code is in main.c
So to make it more readable/modular i wanted to move all the SD-Card Insert/Remove code into its own file, but it doing so it does not work anymore.
The events are not triggered for Insert or Removal. The examples chEvtDispatch is called from c main loop, im my new version i create a thread to look after this, but it does not fire the events.
Now looking into this more, it seems that any call to chEvtRegister to register events as to be in the same thread context, does this sound correct. i.e. all events have to be registered in the same thread context as that calls the event dispatcher?
FatFS Insert/Remove events
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: FatFS Insert/Remove events
The registration must be done in the context of the thread handling the events.
Giovanni
Giovanni