mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 14:42:33 -04:00
Add portapack cpld write usb serial command for AG256SL100 devices (#2401)
This commit is contained in:
parent
c553df7170
commit
874eba8b36
5 changed files with 238 additions and 2 deletions
|
@ -101,7 +101,11 @@ class MessageQueue {
|
|||
}
|
||||
|
||||
bool push(const void* const buf, const size_t len) {
|
||||
chMtxLock(&mutex_write);
|
||||
bool lock_success = chMtxTryLock(&mutex_write);
|
||||
if (!lock_success) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto result = fifo.in_r(buf, len);
|
||||
chMtxUnlock();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue