-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74527b9
commit 676381f
Showing
9 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
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,4 @@ | ||
# Allow config to continue when /dev/ttyS1 is not available | ||
no_fail | ||
# Attach UART Bluetooth on /dev/ttyS1 | ||
enable_service rsetup-hciattach@ttyS1 |
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,2 @@ | ||
config/00-aic8800-reset-ttys1.conf /usr/lib/rsetup/conf.d/on_boot | ||
config/01-hciattach-ttys1.conf /usr/lib/rsetup/conf.d/on_boot |
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 |
---|---|---|
@@ -1 +1 @@ | ||
config/00-hciattach-ttys1.conf /usr/lib/rsetup/conf.d/on_boot | ||
config/01-hciattach-ttys1.conf /usr/lib/rsetup/conf.d/on_boot |
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,12 @@ | ||
[Unit] | ||
Description=Reset AIC8800 Bluetooth on %I | ||
Documentation=https://github.com/radxa-pkg/rsetup/ | ||
Requires=rsetup-hciattach@%i.device | ||
Before=rsetup-hciattach@%i.device | ||
|
||
[Service] | ||
Type=forking | ||
ExecStart=/usr/bin/rsetup __aic8800_reset %I | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,15 @@ | ||
# shellcheck shell=bash | ||
|
||
__aic8800_reset() { | ||
__parameter_count_check 1 "$@" | ||
|
||
while read -r | ||
do | ||
if [[ "$REPLY" == "hci recv thread ready (nil)" ]] | ||
then | ||
return | ||
fi | ||
done < <(timeout 5 bt_test -s uart 1500000 "/dev/$1") | ||
|
||
return 1 | ||
} |