FatFS Insert/Remove events
Posted: Sun Mar 09, 2014 11:22 am
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?
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?