fix: ps2_interrupt.c failed to compile (#18597)

This commit is contained in:
Klesh Wong 2022-10-05 17:59:28 +08:00 committed by GitHub
parent df7f33582f
commit 164d2f36d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {