forked from zephyrproject-rtos/zephyr
-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: ps2: Added gpio bit-banging driver
- Loading branch information
1 parent
3d0d1bf
commit d1d49ce
Showing
5 changed files
with
1,644 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2017 Linaro Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
DT_COMPAT_PS2_GPIO := gpio-ps2 | ||
|
||
config PS2_GPIO | ||
bool "GPIO bit banging PS/2 support" | ||
default $(dt_compat_enabled,$(DT_COMPAT_PS2_GPIO)) | ||
help | ||
Enable software driven (bit banging) PS/2 support using GPIO pins | ||
|
||
if PS2_GPIO | ||
|
||
# PS/2 events must be processed within 30-50us. Therefore we shift the | ||
# BT_CTLR_LLL_PRIO from 0 to 1 and BT_CTLR_ULL_* priorities from 1 to 2. | ||
# We then set the gpio priority to 0. | ||
# | ||
# On top of this, the following has to be added to the device tree: | ||
# &gpiote { | ||
# interrupts = < 0x6 0 >; | ||
# }; | ||
# | ||
# This allows the PS/2 interrupts to be triggered in time. | ||
|
||
config BT_CTLR_ADVANCED_FEATURES | ||
default y | ||
|
||
config BT_CTLR_LLL_PRIO | ||
default 1 | ||
|
||
config BT_CTLR_ULL_HIGH_PRIO | ||
default 2 | ||
|
||
config BT_CTLR_ULL_LOW_PRIO | ||
default 2 | ||
|
||
config PS2_GPIO_INTERRUPT_LOG_ENABLED | ||
bool "Enable extensive interrupt logging." | ||
default n | ||
|
||
endif # PS2_GPIO |
Oops, something went wrong.