summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/chibios
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-04-10 17:34:26 +0100
committerGitHub <noreply@github.com>2021-04-10 17:34:26 +0100
commit7daa2e210cc7fc121259535d724962c9896c5f3a (patch)
tree0febc5b7da86532ae3e8d9d2eebbf3c16498cbff /tmk_core/protocol/chibios
parent7d953332e0d7c0394c607156bf4099881bdf3f43 (diff)
Format code according to conventions (#12540)
Co-authored-by: QMK Bot <hello@qmk.fm>
Diffstat (limited to 'tmk_core/protocol/chibios')
-rw-r--r--tmk_core/protocol/chibios/usb_driver.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tmk_core/protocol/chibios/usb_driver.c b/tmk_core/protocol/chibios/usb_driver.c
index eb72f8ff6d..40bfb8eb2b 100644
--- a/tmk_core/protocol/chibios/usb_driver.c
+++ b/tmk_core/protocol/chibios/usb_driver.c
@@ -81,17 +81,17 @@ static bool qmkusb_start_receive(QMKUSBDriver *qmkusbp) {
*/
static size_t _write(void *ip, const uint8_t *bp, size_t n) {
- output_buffers_queue_t *obqueue = &((QMKUSBDriver *)ip)->obqueue;
- chSysLock();
- const bool full = obqIsFullI(obqueue);
- chSysUnlock();
- if (full || bqIsSuspendedX(obqueue)) {
- /* 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
- would deadlock the keyboard otherwise. */
- return -1;
- }
- return obqWriteTimeout(obqueue, bp, n, TIME_INFINITE);
+ output_buffers_queue_t *obqueue = &((QMKUSBDriver *)ip)->obqueue;
+ chSysLock();
+ const bool full = obqIsFullI(obqueue);
+ chSysUnlock();
+ if (full || bqIsSuspendedX(obqueue)) {
+ /* 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
+ would deadlock the keyboard otherwise. */
+ return -1;
+ }
+ 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); }