summaryrefslogtreecommitdiff
path: root/drivers/ps2/ps2_interrupt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ps2/ps2_interrupt.c')
-rw-r--r--drivers/ps2/ps2_interrupt.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/ps2/ps2_interrupt.c b/drivers/ps2/ps2_interrupt.c
index c49b4f8b75..2810a0f126 100644
--- a/drivers/ps2/ps2_interrupt.c
+++ b/drivers/ps2/ps2_interrupt.c
@@ -66,8 +66,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);
#if defined(PROTOCOL_CHIBIOS)
void ps2_interrupt_service_routine(void);
@@ -76,17 +76,18 @@ void palCallback(void *arg) {
}
# define PS2_INT_INIT() \
- { palSetLineMode(PS2_CLOCK_PIN, PAL_MODE_INPUT); } \
- while (0)
+ do { \
+ palSetLineMode(PS2_CLOCK_PIN, PAL_MODE_INPUT); \
+ } while (0)
# define PS2_INT_ON() \
- { \
+ do { \
palEnableLineEvent(PS2_CLOCK_PIN, PAL_EVENT_MODE_FALLING_EDGE); \
palSetLineCallback(PS2_CLOCK_PIN, palCallback, NULL); \
- } \
- while (0)
+ } while (0)
# define PS2_INT_OFF() \
- { palDisableLineEvent(PS2_CLOCK_PIN); } \
- while (0)
+ do { \
+ palDisableLineEvent(PS2_CLOCK_PIN); \
+ } while (0)
#endif // PROTOCOL_CHIBIOS
void ps2_host_init(void) {
@@ -309,7 +310,7 @@ static inline uint8_t pbuf_dequeue(void) {
return val;
}
-static inline bool pbuf_has_data(void) {
+bool pbuf_has_data(void) {
#if defined(__AVR__)
uint8_t sreg = SREG;
cli();