mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-25 09:56:54 +06:00
Format code according to conventions (#12540)
Co-authored-by: QMK Bot <hello@qmk.fm>
This commit is contained in:
parent
7d953332e0
commit
7daa2e210c
|
@ -81,17 +81,17 @@ static bool qmkusb_start_receive(QMKUSBDriver *qmkusbp) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static size_t _write(void *ip, const uint8_t *bp, size_t n) {
|
static size_t _write(void *ip, const uint8_t *bp, size_t n) {
|
||||||
output_buffers_queue_t *obqueue = &((QMKUSBDriver *)ip)->obqueue;
|
output_buffers_queue_t *obqueue = &((QMKUSBDriver *)ip)->obqueue;
|
||||||
chSysLock();
|
chSysLock();
|
||||||
const bool full = obqIsFullI(obqueue);
|
const bool full = obqIsFullI(obqueue);
|
||||||
chSysUnlock();
|
chSysUnlock();
|
||||||
if (full || bqIsSuspendedX(obqueue)) {
|
if (full || bqIsSuspendedX(obqueue)) {
|
||||||
/* Discard any writes while the queue is suspended or full, i.e. the hidraw
|
/* Discard any writes while the queue is suspended or full, i.e. the hidraw
|
||||||
interface is not open. If we tried to send with an infinite timeout, we
|
interface is not open. If we tried to send with an infinite timeout, we
|
||||||
would deadlock the keyboard otherwise. */
|
would deadlock the keyboard otherwise. */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return obqWriteTimeout(obqueue, bp, n, TIME_INFINITE);
|
return obqWriteTimeout(obqueue, bp, n, TIME_INFINITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t _read(void *ip, uint8_t *bp, size_t n) { return ibqReadTimeout(&((QMKUSBDriver *)ip)->ibqueue, bp, n, TIME_INFINITE); }
|
static size_t _read(void *ip, uint8_t *bp, size_t n) { return ibqReadTimeout(&((QMKUSBDriver *)ip)->ibqueue, bp, n, TIME_INFINITE); }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user