2020 February 29 Breaking Changes Update (#8064)
This commit is contained in:
parent
85041ff05b
commit
26eef35f07
362 changed files with 27772 additions and 8810 deletions
|
@ -88,15 +88,15 @@ static msg_t _put(void *ip, uint8_t b) { return obqPutTimeout(&((QMKUSBDriver *)
|
|||
|
||||
static msg_t _get(void *ip) { return ibqGetTimeout(&((QMKUSBDriver *)ip)->ibqueue, TIME_INFINITE); }
|
||||
|
||||
static msg_t _putt(void *ip, uint8_t b, systime_t timeout) { return obqPutTimeout(&((QMKUSBDriver *)ip)->obqueue, b, timeout); }
|
||||
static msg_t _putt(void *ip, uint8_t b, sysinterval_t timeout) { return obqPutTimeout(&((QMKUSBDriver *)ip)->obqueue, b, timeout); }
|
||||
|
||||
static msg_t _gett(void *ip, systime_t timeout) { return ibqGetTimeout(&((QMKUSBDriver *)ip)->ibqueue, timeout); }
|
||||
static msg_t _gett(void *ip, sysinterval_t timeout) { return ibqGetTimeout(&((QMKUSBDriver *)ip)->ibqueue, timeout); }
|
||||
|
||||
static size_t _writet(void *ip, const uint8_t *bp, size_t n, systime_t timeout) { return obqWriteTimeout(&((QMKUSBDriver *)ip)->obqueue, bp, n, timeout); }
|
||||
static size_t _writet(void *ip, const uint8_t *bp, size_t n, sysinterval_t timeout) { return obqWriteTimeout(&((QMKUSBDriver *)ip)->obqueue, bp, n, timeout); }
|
||||
|
||||
static size_t _readt(void *ip, uint8_t *bp, size_t n, systime_t timeout) { return ibqReadTimeout(&((QMKUSBDriver *)ip)->ibqueue, bp, n, timeout); }
|
||||
static size_t _readt(void *ip, uint8_t *bp, size_t n, sysinterval_t timeout) { return ibqReadTimeout(&((QMKUSBDriver *)ip)->ibqueue, bp, n, timeout); }
|
||||
|
||||
static const struct QMKUSBDriverVMT vmt = {_write, _read, _put, _get, _putt, _gett, _writet, _readt};
|
||||
static const struct QMKUSBDriverVMT vmt = {0, _write, _read, _put, _get, _putt, _gett, _writet, _readt};
|
||||
|
||||
/**
|
||||
* @brief Notification of empty buffer released into the input buffers queue.
|
||||
|
|
|
@ -469,7 +469,7 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
|
|||
#endif /* NKRO_ENABLE */
|
||||
/* arm the idle timer if boot protocol & idle */
|
||||
osalSysLockFromISR();
|
||||
chVTSetI(&keyboard_idle_timer, 4 * MS2ST(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp);
|
||||
chVTSetI(&keyboard_idle_timer, 4 * TIME_MS2I(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp);
|
||||
osalSysUnlockFromISR();
|
||||
}
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
|
|||
if (keyboard_idle) {
|
||||
#endif /* NKRO_ENABLE */
|
||||
osalSysLockFromISR();
|
||||
chVTSetI(&keyboard_idle_timer, 4 * MS2ST(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp);
|
||||
chVTSetI(&keyboard_idle_timer, 4 * TIME_MS2I(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp);
|
||||
osalSysUnlockFromISR();
|
||||
}
|
||||
usbSetupTransfer(usbp, NULL, 0, NULL);
|
||||
|
@ -601,7 +601,7 @@ static void keyboard_idle_timer_cb(void *arg) {
|
|||
usbStartTransmitI(usbp, KEYBOARD_IN_EPNUM, (uint8_t *)&keyboard_report_sent, KEYBOARD_EPSIZE);
|
||||
}
|
||||
/* rearm the timer */
|
||||
chVTSetI(&keyboard_idle_timer, 4 * MS2ST(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp);
|
||||
chVTSetI(&keyboard_idle_timer, 4 * TIME_MS2I(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp);
|
||||
}
|
||||
|
||||
/* do not rearm the timer if the condition above fails
|
||||
|
@ -700,7 +700,7 @@ void send_mouse(report_mouse_t *report) {
|
|||
* every iteration - otherwise the system will remain locked,
|
||||
* no interrupts served, so USB not going through as well.
|
||||
* Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */
|
||||
if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[MOUSE_IN_EPNUM]->in_state->thread, MS2ST(10)) == MSG_TIMEOUT) {
|
||||
if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[MOUSE_IN_EPNUM]->in_state->thread, TIME_MS2I(10)) == MSG_TIMEOUT) {
|
||||
osalSysUnlock();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue