1
0
Fork 0

Improve PS/2 mouse performance (#17111)

This commit is contained in:
Andrew Dunai 2022-05-31 09:15:17 +03:00 committed by GitHub
parent d44a950c10
commit ecce9900c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 6 deletions

View file

@ -72,8 +72,8 @@ uint8_t ps2_error = PS2_ERR_NONE;
static inline uint8_t pbuf_dequeue(void);
static inline void pbuf_enqueue(uint8_t data);
static inline bool pbuf_has_data(void);
static inline void pbuf_clear(void);
bool pbuf_has_data(void);
void ps2_host_init(void) {
idle(); // without this many USART errors occur when cable is disconnected
@ -212,7 +212,7 @@ static inline uint8_t pbuf_dequeue(void) {
return val;
}
static inline bool pbuf_has_data(void) {
bool pbuf_has_data(void) {
uint8_t sreg = SREG;
cli();
bool has_data = (pbuf_head != pbuf_tail);