From d4a1bd480003f3e1a0590bc46fbcb24f05652ca7 Mon Sep 17 00:00:00 2001 From: tzh <tanzhtanzh@gmail.com> Date: Thu, 15 Aug 2024 06:56:47 +0000 Subject: [PATCH] feat(wfit/bt): update aic8800 wifi/bt drive and hal --- android/hardware/aic/libbt/src/upio.c | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/android/hardware/aic/libbt/src/upio.c b/android/hardware/aic/libbt/src/upio.c index 5628df9..0bdb845 100755 --- a/android/hardware/aic/libbt/src/upio.c +++ b/android/hardware/aic/libbt/src/upio.c @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 2019-2027 AIC Corporation + * Copyright (C) 2019-2021 Aicsemi Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ #include <errno.h> #include <string.h> #include <cutils/properties.h> -#include "bt_vendor_aicbt.h" +#include "bt_vendor_aic.h" #include "upio.h" #include "userial_vendor.h" #include <stdio.h> @@ -77,15 +77,14 @@ * the bluesleep LPM code. The current value used in bluesleep is 10sec. */ #ifndef PROC_BTWRITE_TIMER_TIMEOUT_MS -#define PROC_BTWRITE_TIMER_TIMEOUT_MS 4000 +#define PROC_BTWRITE_TIMER_TIMEOUT_MS 0 #else #undef PROC_BTWRITE_TIMER_TIMEOUT_MS -#define PROC_BTWRITE_TIMER_TIMEOUT_MS 4000 +#define PROC_BTWRITE_TIMER_TIMEOUT_MS 0 #endif /* lpm proc control block */ -typedef struct -{ +typedef struct { uint8_t btwrite_active; uint8_t timer_created; timer_t timer_id; @@ -100,7 +99,6 @@ ******************************************************************************/ static uint8_t upio_state[UPIO_MAX_COUNT]; -static int rfkill_id = -1; static int bt_emul_enable = 0; static char *rfkill_state_path = NULL; @@ -155,7 +153,7 @@ char path[64]; char buf[16]; int fd, sz, id; - const char *basepath = "/sys/devices/platform/aic-bt/rfkill"; + const char *basepath = "/sys/devices/platform/aic-bsp/rfkill"; DIR *d; struct dirent *de; @@ -329,7 +327,7 @@ return 0; #endif - if (rfkill_id == -1) { + if (rfkill_state_path == NULL) { if (init_rfkill()) return ret; } -- Gitblit v1.6.2