mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Clean USBDBG_FRAME_SIZE code.
This commit is contained in:
parent
1142940b88
commit
5b8de6f867
@ -92,11 +92,12 @@ void usbdbg_data_in(void *buffer, int length)
|
||||
}
|
||||
|
||||
case USBDBG_FRAME_SIZE:
|
||||
((uint32_t*)buffer)[0] = 0;
|
||||
// Try to lock FB. If header size == 0 frame is not ready
|
||||
if (mutex_try_lock(&JPEG_FB()->lock, MUTEX_TID_IDE)) {
|
||||
// If header size == 0 frame is not ready
|
||||
if (JPEG_FB()->size == 0) {
|
||||
// Return 0
|
||||
((uint32_t*)buffer)[0] = 0;
|
||||
// unlock FB
|
||||
mutex_unlock(&JPEG_FB()->lock, MUTEX_TID_IDE);
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user