• H
    atmel-mci: Implement tasklet as a state machine · c06ad258
    Haavard Skinnemoen 提交于
    With the current system of completed/pending events, things may get
    handled in different order depending on which event triggers first. For
    example, if the data transfer is complete before the command, the stop
    command must be sent after the command is complete, not the data. This
    creates a bit of complexity around the stop command.
    
    By having the tasklet go through a sequence of clearly defined states,
    things always happen in a certain order even if the events come at
    different times, so the stop command can simply be sent when we exit the
    "sending data" state because we will never enter that state before the
    command has been sent successfully.
    Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
    c06ad258
atmel-mci.c 27.5 KB