add e_player lib remove wifi log

This commit is contained in:
hyx 2026-04-07 19:45:10 +08:00
parent 4c2ae49097
commit 988afb1801
21 changed files with 119 additions and 7 deletions

View File

@ -46,12 +46,17 @@ extern int aicwf_dbg_level_bsp;
#define AICWF_LOG "AICWFDBG("
#define AICWFDBG(level, args, arg...) \
//#define AICWFDBG(level, args, arg...) \
do { \
if (aicwf_dbg_level_bsp & level) { \
printk(AICWF_LOG#level")\t" args, ##arg); \
} \
} while (0)
#define AICWFDBG(level, args, arg...) \
do { \
if (aicwf_dbg_level_bsp & level) { \
} \
} while (0)
#define RWNX_DBG(fmt, ...) \
do { \

View File

@ -20,12 +20,17 @@ void rwnx_data_dump(char* tag, void* data, unsigned long len);
#define AICWF_LOG "AICWFDBG("
#define AICWFDBG(level, args, arg...) \
//#define AICWFDBG(level, args, arg...) \
do { \
if (aicwf_dbg_level & level) { \
printk(AICWF_LOG#level")\t" args, ##arg); \
} \
} while (0)
#define AICWFDBG(level, args, arg...) \
do { \
if (aicwf_dbg_level & level) { \
} \
} while (0)
#define RWNX_DBG(fmt, ...) \
do { \

View File

@ -193,20 +193,20 @@
u-boot,dm-pre-reloc;
status = "okay";
};
/*
rfkill_bt {
compatible = "rfkill-gpio";
rfkill-name = "bluetooth";
rfkill-type = <2>;
reset-gpios = <&gpio_d 3 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio_c 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
/*
rfkill_wlan {
compatible = "rfkill-gpio";
rfkill-name = "wlan";
rfkill-type = <1>;
reset-gpios = <&gpio_d 1 GPIO_ACTIVE_HIGH>;
//reset-gpios = <&gpio_c 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
*/
@ -451,7 +451,7 @@
pinctrl-names = "default";
pinctrl-0 = <&sdmc1_pins>;
max-frequency= <40000000>;
power-gpios = <&gpio_c 6 GPIO_ACTIVE_HIGH>;
//power-gpios = <&gpio_c 6 GPIO_ACTIVE_HIGH>;
bus-width = <4>;
no-mmc;
no-sd;

View File

@ -0,0 +1,102 @@
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
HCI_DEV=hci0
UART_DEV=/dev/ttyS2
HCIATTACH_BIN=/usr/bin/hciattach
HCIATTACH_ARGS="-s 1500000 ${UART_DEV} any 1500000 flow nosleep"
HCI_TOOL=/usr/bin/bt-hci-tool
BTGATT_BIN=/usr/bin/btgatt-server
BTGATT_ARGS="-i ${HCI_DEV} -s low -t public"
BT_LOCAL_NAME="DSL-ETAG"
HCI_WAIT_TIMEOUT=10
ATTACH_PIDFILE=/var/run/hciattach.pid
BTGATT_PIDFILE=/var/run/btgatt-server.pid
wait_for_hci()
{
"${HCI_TOOL}" wait "${HCI_DEV}" "${HCI_WAIT_TIMEOUT}"
}
bring_hci_up()
{
"${HCI_TOOL}" up "${HCI_DEV}"
}
set_hci_name()
{
"${HCI_TOOL}" name "${HCI_DEV}" "${BT_LOCAL_NAME}"
}
start_bt()
{
echo "[BT] Init AIC8800..."
insmod /lib/modules/5.10.44/kernel/drivers/net/wireless/aic8800/aic8800_btlpm/aic8800_btlpm.ko
sleep 1
killall hciattach 2>/dev/null
killall btgatt-server 2>/dev/null
rm -f "${ATTACH_PIDFILE}" "${BTGATT_PIDFILE}"
"${HCIATTACH_BIN}" ${HCIATTACH_ARGS} &
echo $! > "${ATTACH_PIDFILE}"
if ! wait_for_hci; then
echo "[BT] ERROR: ${HCI_DEV} not ready"
return 1
fi
if ! bring_hci_up; then
echo "[BT] ERROR: failed to bring ${HCI_DEV} up"
return 1
fi
if ! set_hci_name; then
echo "[BT] WARN: failed to set controller local name"
fi
echo "[BT] HCI ready"
"${BTGATT_BIN}" ${BTGATT_ARGS} >/dev/null 2>&1 &
echo $! > "${BTGATT_PIDFILE}"
echo "[BT] GATT server started"
}
stop_bt()
{
if [ -f "${BTGATT_PIDFILE}" ]; then
kill "$(cat "${BTGATT_PIDFILE}")" 2>/dev/null
rm -f "${BTGATT_PIDFILE}"
else
killall btgatt-server 2>/dev/null
fi
if [ -f "${ATTACH_PIDFILE}" ]; then
kill "$(cat "${ATTACH_PIDFILE}")" 2>/dev/null
rm -f "${ATTACH_PIDFILE}"
else
killall hciattach 2>/dev/null
fi
}
case "$1" in
start)
start_bt
;;
stop)
stop_bt
;;
restart)
stop_bt
sleep 1
start_bt
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit $?

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.