Made sioStopOperation() and sioStartOperation() call possible in both SIO_READY and SIO_ACTIVE states.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15677 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2022-07-06 08:36:40 +00:00
parent 10ffb0ecfa
commit c699613cdc
2 changed files with 8 additions and 4 deletions

View File

@ -309,7 +309,8 @@ void sioStartOperation(SIODriver *siop, const SIOOperation *operation) {
osalSysLock(); osalSysLock();
osalDbgAssert(siop->state == SIO_READY, "invalid state"); osalDbgAssert((siop->state == SIO_READY) ||
(siop->state == SIO_ACTIVE), "invalid state");
/* The application can pass NULL if it is not interested in callbacks, /* The application can pass NULL if it is not interested in callbacks,
attaching a default operation structure.*/ attaching a default operation structure.*/
@ -319,9 +320,11 @@ void sioStartOperation(SIODriver *siop, const SIOOperation *operation) {
else { else {
siop->operation = &default_operation; siop->operation = &default_operation;
} }
siop->state = SIO_ACTIVE;
if (siop->state == SIO_READY) {
sio_lld_start_operation(siop); sio_lld_start_operation(siop);
siop->state = SIO_ACTIVE;
}
osalSysUnlock(); osalSysUnlock();
} }

View File

@ -74,7 +74,8 @@
***************************************************************************** *****************************************************************************
*** Next *** *** Next ***
- NEW: Made sioStopOperation() call possible in SIO_READY state. - NEW: Made sioStopOperation() and sioStartOperation() call possible in
both SIO_READY and SIO_ACTIVE states.
- NEW: Non-proprietary LLVM build support. - NEW: Non-proprietary LLVM build support.
- NEW: Added palReadGroupLatch() to PAL driver. - NEW: Added palReadGroupLatch() to PAL driver.
- NEW: Added a Posix-favored shell named "msh" (Mini Shell). The shell is able - NEW: Added a Posix-favored shell named "msh" (Mini Shell). The shell is able