summaryrefslogtreecommitdiffstats
path: root/gki
diff options
context:
space:
mode:
authorAndre Eisenbach <andre@broadcom.com>2012-09-18 01:35:44 -0700
committerMatthew Xie <mattx@google.com>2012-09-18 10:06:32 -0700
commitcc914cffd521b2e6e1be804c82aea2388b843ebf (patch)
treea4859572083eb29c931cc5066645f9c0a2929d71 /gki
parent6ed67e2ac54c83d18701d2b4ee1b9d729e99a38c (diff)
downloadexternal_bluetooth_bluedroid-cc914cffd521b2e6e1be804c82aea2388b843ebf.zip
external_bluetooth_bluedroid-cc914cffd521b2e6e1be804c82aea2388b843ebf.tar.gz
external_bluetooth_bluedroid-cc914cffd521b2e6e1be804c82aea2388b843ebf.tar.bz2
Header file and whitespace cleanups
Also fixed file permission to remove executable bit from source files. Change-Id: I6954c2d16190bc35b1b0d38386543253696b1112
Diffstat (limited to 'gki')
-rw-r--r--gki/Android.mk8
-rw-r--r--gki/common/gki.h36
-rw-r--r--gki/common/gki_buffer.c72
-rw-r--r--gki/common/gki_common.h2
-rw-r--r--gki/common/gki_debug.c6
-rw-r--r--gki/common/gki_inet.h2
-rw-r--r--gki/common/gki_time.c68
7 files changed, 97 insertions, 97 deletions
diff --git a/gki/Android.mk b/gki/Android.mk
index 13a4a95..c76c237 100644
--- a/gki/Android.mk
+++ b/gki/Android.mk
@@ -14,7 +14,7 @@ LOCAL_CFLAGS += -Werror $(bdroid_CFLAGS)
ifeq ($(BOARD_HAVE_BLUETOOTH_BCM),true)
LOCAL_CFLAGS += \
- -DBOARD_HAVE_BLUETOOTH_BCM
+ -DBOARD_HAVE_BLUETOOTH_BCM
endif
LOCAL_PRELINK_MODULE:=false
@@ -22,9 +22,9 @@ LOCAL_SRC_FILES:= \
./ulinux/gki_ulinux.c \
./common/gki_debug.c \
./common/gki_time.c \
- ./common/gki_buffer.c
-
-LOCAL_MODULE := libbt-brcm_gki
+ ./common/gki_buffer.c
+
+LOCAL_MODULE := libbt-brcm_gki
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := libcutils libc
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
diff --git a/gki/common/gki.h b/gki/common/gki.h
index d53ab04..4bfb43f 100644
--- a/gki/common/gki.h
+++ b/gki/common/gki.h
@@ -94,7 +94,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 1)
#ifndef GKI_POOL_ID_0
-#define GKI_POOL_ID_0 0
+#define GKI_POOL_ID_0 0
#endif /* ifndef GKI_POOL_ID_0 */
#ifndef GKI_BUF0_SIZE
@@ -107,7 +107,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 2)
#ifndef GKI_POOL_ID_1
-#define GKI_POOL_ID_1 0
+#define GKI_POOL_ID_1 0
#endif /* ifndef GKI_POOL_ID_1 */
#ifndef GKI_BUF1_SIZE
@@ -120,7 +120,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 3)
#ifndef GKI_POOL_ID_2
-#define GKI_POOL_ID_2 0
+#define GKI_POOL_ID_2 0
#endif /* ifndef GKI_POOL_ID_2 */
#ifndef GKI_BUF2_SIZE
@@ -133,7 +133,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 4)
#ifndef GKI_POOL_ID_3
-#define GKI_POOL_ID_3 0
+#define GKI_POOL_ID_3 0
#endif /* ifndef GKI_POOL_ID_4 */
#ifndef GKI_BUF3_SIZE
@@ -146,7 +146,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 5)
#ifndef GKI_POOL_ID_4
-#define GKI_POOL_ID_4 0
+#define GKI_POOL_ID_4 0
#endif /* ifndef GKI_POOL_ID_4 */
#ifndef GKI_BUF4_SIZE
@@ -159,7 +159,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 6)
#ifndef GKI_POOL_ID_5
-#define GKI_POOL_ID_5 0
+#define GKI_POOL_ID_5 0
#endif /* ifndef GKI_POOL_ID_5 */
#ifndef GKI_BUF5_SIZE
@@ -172,7 +172,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 7)
#ifndef GKI_POOL_ID_6
-#define GKI_POOL_ID_6 0
+#define GKI_POOL_ID_6 0
#endif /* ifndef GKI_POOL_ID_6 */
#ifndef GKI_BUF6_SIZE
@@ -185,7 +185,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 8)
#ifndef GKI_POOL_ID_7
-#define GKI_POOL_ID_7 0
+#define GKI_POOL_ID_7 0
#endif /* ifndef GKI_POOL_ID_7 */
#ifndef GKI_BUF7_SIZE
@@ -198,7 +198,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 9)
#ifndef GKI_POOL_ID_8
-#define GKI_POOL_ID_8 0
+#define GKI_POOL_ID_8 0
#endif /* ifndef GKI_POOL_ID_8 */
#ifndef GKI_BUF8_SIZE
@@ -211,7 +211,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 10)
#ifndef GKI_POOL_ID_9
-#define GKI_POOL_ID_9 0
+#define GKI_POOL_ID_9 0
#endif /* ifndef GKI_POOL_ID_9 */
#ifndef GKI_BUF9_SIZE
@@ -224,7 +224,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 11)
#ifndef GKI_POOL_ID_10
-#define GKI_POOL_ID_10 0
+#define GKI_POOL_ID_10 0
#endif /* ifndef GKI_POOL_ID_10 */
#ifndef GKI_BUF10_SIZE
@@ -237,7 +237,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 12)
#ifndef GKI_POOL_ID_11
-#define GKI_POOL_ID_11 0
+#define GKI_POOL_ID_11 0
#endif /* ifndef GKI_POOL_ID_11 */
#ifndef GKI_BUF11_SIZE
@@ -250,7 +250,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 13)
#ifndef GKI_POOL_ID_12
-#define GKI_POOL_ID_12 0
+#define GKI_POOL_ID_12 0
#endif /* ifndef GKI_POOL_ID_12 */
#ifndef GKI_BUF12_SIZE
@@ -263,7 +263,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 14)
#ifndef GKI_POOL_ID_13
-#define GKI_POOL_ID_13 0
+#define GKI_POOL_ID_13 0
#endif /* ifndef GKI_POOL_ID_13 */
#ifndef GKI_BUF13_SIZE
@@ -276,7 +276,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 15)
#ifndef GKI_POOL_ID_14
-#define GKI_POOL_ID_14 0
+#define GKI_POOL_ID_14 0
#endif /* ifndef GKI_POOL_ID_14 */
#ifndef GKI_BUF14_SIZE
@@ -289,7 +289,7 @@
#if (GKI_NUM_FIXED_BUF_POOLS < 16)
#ifndef GKI_POOL_ID_15
-#define GKI_POOL_ID_15 0
+#define GKI_POOL_ID_15 0
#endif /* ifndef GKI_POOL_ID_15 */
#ifndef GKI_BUF15_SIZE
@@ -324,7 +324,7 @@ typedef struct _tle
/* Define a timer list queue
*/
-typedef struct
+typedef struct
{
TIMER_LIST_ENT *p_first;
TIMER_LIST_ENT *p_last;
@@ -335,7 +335,7 @@ typedef struct
/***********************************************************************
** This queue is a general purpose buffer queue, for application use.
*/
-typedef struct
+typedef struct
{
void *p_first;
void *p_last;
diff --git a/gki/common/gki_buffer.c b/gki/common/gki_buffer.c
index fbf19b8..ca0e0a0 100644
--- a/gki/common/gki_buffer.c
+++ b/gki/common/gki_buffer.c
@@ -51,7 +51,7 @@ static void gki_init_free_queue (UINT8 id, UINT16 size, UINT16 total, void *p_me
p_cb->pool_end[id] = (UINT8 *)p_mem + (act_size * total);
}
// btla-specific --
-
+
p_cb->pool_size[id] = act_size;
p_cb->freeq[id].size = (UINT16) tempsize;
@@ -90,9 +90,9 @@ static BOOLEAN gki_alloc_free_queue(UINT8 id)
FREE_QUEUE_T *Q;
tGKI_COM_CB *p_cb = &gki_cb.com;
GKI_TRACE("\ngki_alloc_free_queue in, id:%d \n", (int)id );
-
+
Q = &p_cb->freeq[p_cb->pool_list[id]];
-
+
if(Q->p_first == 0)
{
void* p_mem = GKI_os_malloc((Q->size + BUFFER_PADDING_SIZE) * Q->total);
@@ -105,7 +105,7 @@ static BOOLEAN gki_alloc_free_queue(UINT8 id)
return TRUE;
}
GKI_exception (GKI_ERROR_BUF_SIZE_TOOBIG, "gki_alloc_free_queue: Not enough memory");
- }
+ }
GKI_TRACE("\ngki_alloc_free_queue out failed, id:%d\n", id);
return FALSE;
}
@@ -125,10 +125,10 @@ void gki_dealloc_free_queue(void)
p_cb->freeq[i].max_cnt = 0;
p_cb->freeq[i].p_first = NULL;
p_cb->freeq[i].p_last = NULL;
-
+
p_cb->pool_start[i] = NULL;
p_cb->pool_end[i] = NULL;
- p_cb->pool_size[i] = 0;
+ p_cb->pool_size[i] = 0;
}
}
}
@@ -176,7 +176,7 @@ void gki_buffer_init(void)
}
/* Use default from target.h */
- p_cb->pool_access_mask = GKI_DEF_BUFPOOL_PERM_MASK;
+ p_cb->pool_access_mask = GKI_DEF_BUFPOOL_PERM_MASK;
// btla-specific ++
#if (!defined GKI_USE_DEFERED_ALLOC_BUF_POOLS && (GKI_USE_DYNAMIC_BUFFERS == TRUE))
@@ -389,7 +389,7 @@ void *GKI_getbuf (UINT16 size)
GKI_disable();
/* search the public buffer pools that are big enough to hold the size
- * until a free buffer is found */
+ * until a free buffer is found */
for ( ; i < p_cb->curr_total_no_of_pools; i++)
{
/* Only look at PUBLIC buffer pools (bypass RESTRICTED pools) */
@@ -397,7 +397,7 @@ void *GKI_getbuf (UINT16 size)
continue;
Q = &p_cb->freeq[p_cb->pool_list[i]];
- if(Q->cur_cnt < Q->total)
+ if(Q->cur_cnt < Q->total)
{
// btla-specific ++
#ifdef GKI_USE_DEFERED_ALLOC_BUF_POOLS
@@ -494,7 +494,7 @@ void *GKI_getpoolbuf (UINT8 pool_id)
/* try for free buffers in public pools */
return (GKI_getbuf(p_cb->freeq[pool_id].size));
-
+
}
/*******************************************************************************
@@ -512,7 +512,7 @@ void GKI_freebuf (void *p_buf)
{
FREE_QUEUE_T *Q;
BUFFER_HDR_T *p_hdr;
-
+
#if (GKI_ENABLE_BUF_CORRUPTION_CHECK == TRUE)
if (!p_buf || gki_chk_buf_damage(p_buf))
{
@@ -520,23 +520,23 @@ void GKI_freebuf (void *p_buf)
return;
}
#endif
-
+
p_hdr = (BUFFER_HDR_T *) ((UINT8 *)p_buf - BUFFER_HDR_SIZE);
-
+
if (p_hdr->status != BUF_STATUS_UNLINKED)
{
GKI_exception(GKI_ERROR_FREEBUF_BUF_LINKED, "Freeing Linked Buf");
return;
}
-
+
if (p_hdr->q_id >= GKI_NUM_TOTAL_BUF_POOLS)
{
GKI_exception(GKI_ERROR_FREEBUF_BAD_QID, "Bad Buf QId");
return;
}
-
+
GKI_disable();
-
+
/*
** Release the buffer
*/
@@ -545,16 +545,16 @@ void GKI_freebuf (void *p_buf)
Q->p_last->p_next = p_hdr;
else
Q->p_first = p_hdr;
-
+
Q->p_last = p_hdr;
p_hdr->p_next = NULL;
p_hdr->status = BUF_STATUS_FREE;
p_hdr->task_id = GKI_INVALID_TASK;
if (Q->cur_cnt > 0)
Q->cur_cnt--;
-
+
GKI_enable();
-
+
return;
}
@@ -576,7 +576,7 @@ UINT16 GKI_get_buf_size (void *p_buf)
p_hdr = (BUFFER_HDR_T *)((UINT8 *) p_buf - BUFFER_HDR_SIZE);
- if ((UINT32)p_hdr & 1)
+ if ((UINT32)p_hdr & 1)
return (0);
if (p_hdr->q_id < GKI_NUM_TOTAL_BUF_POOLS)
@@ -1001,7 +1001,7 @@ void *GKI_getnext (void *p_buf)
BOOLEAN GKI_queue_is_empty(BUFFER_Q *p_q)
{
return ((BOOLEAN) (p_q->count == 0));
-}
+}
/*******************************************************************************
**
@@ -1068,10 +1068,10 @@ UINT8 GKI_set_pool_permission(UINT8 pool_id, UINT8 permission)
{
if (permission == GKI_RESTRICTED_POOL)
p_cb->pool_access_mask = (UINT16)(p_cb->pool_access_mask | (1 << pool_id));
-
+
else /* mark the pool as public */
p_cb->pool_access_mask = (UINT16)(p_cb->pool_access_mask & ~(1 << pool_id));
-
+
return (GKI_SUCCESS);
}
else
@@ -1082,7 +1082,7 @@ UINT8 GKI_set_pool_permission(UINT8 pool_id, UINT8 permission)
**
** Function gki_add_to_pool_list
**
-** Description Adds pool to the pool list which is arranged in the
+** Description Adds pool to the pool list which is arranged in the
** order of size
**
** Returns void
@@ -1095,7 +1095,7 @@ static void gki_add_to_pool_list(UINT8 pool_id)
tGKI_COM_CB *p_cb = &gki_cb.com;
/* Find the position where the specified pool should be inserted into the list */
- for(i=0; i < p_cb->curr_total_no_of_pools; i++)
+ for(i=0; i < p_cb->curr_total_no_of_pools; i++)
{
if(p_cb->freeq[pool_id].size <= p_cb->freeq[ p_cb->pool_list[i] ].size)
@@ -1117,7 +1117,7 @@ static void gki_add_to_pool_list(UINT8 pool_id)
**
** Function gki_remove_from_pool_list
**
-** Description Removes pool from the pool list. Called when a pool is deleted
+** Description Removes pool from the pool list. Called when a pool is deleted
**
** Returns void
**
@@ -1126,7 +1126,7 @@ static void gki_remove_from_pool_list(UINT8 pool_id)
{
tGKI_COM_CB *p_cb = &gki_cb.com;
UINT8 i;
-
+
for(i=0; i < p_cb->curr_total_no_of_pools; i++)
{
if(pool_id == p_cb->pool_list[i])
@@ -1184,7 +1184,7 @@ void *GKI_igetpoolbuf (UINT8 pool_id)
return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE));
}
- return (NULL);
+ return (NULL);
}
/*******************************************************************************
@@ -1393,13 +1393,13 @@ void GKI_delete_pool (UINT8 pool_id)
{
FREE_QUEUE_T *Q;
tGKI_COM_CB *p_cb = &gki_cb.com;
-
+
if ((pool_id >= GKI_NUM_TOTAL_BUF_POOLS) || (!p_cb->pool_start[pool_id]))
return;
-
+
GKI_disable();
Q = &p_cb->freeq[pool_id];
-
+
if (!Q->cur_cnt)
{
Q->size = 0;
@@ -1408,21 +1408,21 @@ void GKI_delete_pool (UINT8 pool_id)
Q->max_cnt = 0;
Q->p_first = NULL;
Q->p_last = NULL;
-
+
GKI_os_free (p_cb->pool_start[pool_id]);
-
+
p_cb->pool_start[pool_id] = NULL;
p_cb->pool_end[pool_id] = NULL;
p_cb->pool_size[pool_id] = 0;
-
+
gki_remove_from_pool_list(pool_id);
p_cb->curr_total_no_of_pools--;
}
else
GKI_exception(GKI_ERROR_DELETE_POOL_BAD_QID, "Deleting bad pool");
-
+
GKI_enable();
-
+
return;
}
diff --git a/gki/common/gki_common.h b/gki/common/gki_common.h
index 6093abf..a0c713e 100644
--- a/gki/common/gki_common.h
+++ b/gki/common/gki_common.h
@@ -326,7 +326,7 @@ typedef struct
#if (GKI_DEBUG == TRUE)
UINT16 ExceptionCnt; /* number of GKI exceptions that have happened */
- EXCEPTION_T Exception[GKI_MAX_EXCEPTION];
+ EXCEPTION_T Exception[GKI_MAX_EXCEPTION];
#endif
} tGKI_COM_CB;
diff --git a/gki/common/gki_debug.c b/gki/common/gki_debug.c
index 45b281a..0f0505d 100644
--- a/gki/common/gki_debug.c
+++ b/gki/common/gki_debug.c
@@ -94,7 +94,7 @@ void GKI_PrintBuffer(void)
** Function gki_calc_stack
**
** Description This function tries to calculate the amount of
-** stack used by looking non magic num. Magic num is consider
+** stack used by looking non magic num. Magic num is consider
** the first byte in the stack.
**
** Returns the number of unused byte on the stack. 4 in case of stack overrun
@@ -146,7 +146,7 @@ void GKI_print_task(void)
}
}
-#endif
+#endif
}
@@ -288,7 +288,7 @@ void gki_print_exception(FP_PRINT print)
{
pExp = &gki_cb.com.Exception[i];
print("%d: Type=%d, Task=%d: %s\n", i,
- (INT32)pExp->type, (INT32)pExp->taskid, (INT8 *)pExp->msg);
+ (INT32)pExp->type, (INT32)pExp->taskid, (INT8 *)pExp->msg);
}
}
diff --git a/gki/common/gki_inet.h b/gki/common/gki_inet.h
index 780e9a0..0180303 100644
--- a/gki/common/gki_inet.h
+++ b/gki/common/gki_inet.h
@@ -5,7 +5,7 @@
** Function This file contains macros and interfaces for host-to-network
** conversions used in Internet operations.
**
-**
+**
** Copyright (c) 2002-2004, WIDCOMM Inc., All Rights Reserved.
** Proprietary and confidential.
**
diff --git a/gki/common/gki_time.c b/gki/common/gki_time.c
index 8121654..7fd2303 100644
--- a/gki/common/gki_time.c
+++ b/gki/common/gki_time.c
@@ -1,13 +1,13 @@
/****************************************************************************
-**
-** Name GKI_time.c
**
-** Function this file contains GKI time related functions
-**
+** Name GKI_time.c
+**
+** Function this file contains GKI time related functions
+**
** Copyright (c) 1999-2011, Broadcom Corp., All Rights Reserved.
-** Proprietary and confidential.
-**
+** Proprietary and confidential.
+**
*****************************************************************************/
#include "gki_int.h"
@@ -50,22 +50,22 @@ void gki_timers_init(void)
{
gki_cb.com.OSWaitTmr [tt] = 0;
-#if (GKI_NUM_TIMERS > 0)
+#if (GKI_NUM_TIMERS > 0)
gki_cb.com.OSTaskTmr0 [tt] = 0;
gki_cb.com.OSTaskTmr0R [tt] = 0;
#endif
-#if (GKI_NUM_TIMERS > 1)
+#if (GKI_NUM_TIMERS > 1)
gki_cb.com.OSTaskTmr1 [tt] = 0;
gki_cb.com.OSTaskTmr1R [tt] = 0;
#endif
-#if (GKI_NUM_TIMERS > 2)
+#if (GKI_NUM_TIMERS > 2)
gki_cb.com.OSTaskTmr2 [tt] = 0;
gki_cb.com.OSTaskTmr2R [tt] = 0;
#endif
-#if (GKI_NUM_TIMERS > 3)
+#if (GKI_NUM_TIMERS > 3)
gki_cb.com.OSTaskTmr3 [tt] = 0;
gki_cb.com.OSTaskTmr3R [tt] = 0;
#endif
@@ -87,7 +87,7 @@ void gki_timers_init(void)
** Function gki_timers_is_timer_running
**
** Description This internal function is called to test if any gki timer are running
-**
+**
**
** Returns TRUE if at least one time is running in the system, FALSE else.
**
@@ -98,28 +98,28 @@ BOOLEAN gki_timers_is_timer_running(void)
for (tt = 0; tt < GKI_MAX_TASKS; tt++)
{
-#if (GKI_NUM_TIMERS > 0)
+#if (GKI_NUM_TIMERS > 0)
if(gki_cb.com.OSTaskTmr0 [tt])
{
return TRUE;
}
#endif
-#if (GKI_NUM_TIMERS > 1)
+#if (GKI_NUM_TIMERS > 1)
if(gki_cb.com.OSTaskTmr1 [tt] )
{
return TRUE;
}
#endif
-#if (GKI_NUM_TIMERS > 2)
+#if (GKI_NUM_TIMERS > 2)
if(gki_cb.com.OSTaskTmr2 [tt] )
{
return TRUE;
}
#endif
-#if (GKI_NUM_TIMERS > 3)
+#if (GKI_NUM_TIMERS > 3)
if(gki_cb.com.OSTaskTmr3 [tt] )
{
return TRUE;
@@ -150,7 +150,7 @@ UINT32 GKI_get_tick_count(void)
**
** Function GKI_ready_to_sleep
**
-** Description This function returns the number of system ticks until the
+** Description This function returns the number of system ticks until the
** next timer will expire. It is typically called by a power
** savings manager to find out how long it can have the system
** sleep before it needs to service the next entry.
@@ -335,9 +335,9 @@ void GKI_stop_timer (UINT8 tnum)
}
GKI_disable();
-
+
if (gki_timers_is_timer_running() == FALSE)
- {
+ {
if (gki_cb.com.p_tick_cb)
{
#if (defined(GKI_DELAY_STOP_SYS_TICK) && (GKI_DELAY_STOP_SYS_TICK > 0))
@@ -417,7 +417,7 @@ void GKI_timer_update (INT32 ticks_since_last_update)
gki_cb.com.OSTicksTilStop -= ticks_since_last_update;
}
#endif
-
+
/* No need to update the ticks if no timeout has occurred */
if (gki_cb.com.OSTicksTilExp > 0)
{
@@ -580,10 +580,10 @@ void GKI_timer_update (INT32 ticks_since_last_update)
**
** Function GKI_timer_queue_empty
**
-** Description This function is called by applications to see whether the timer
+** Description This function is called by applications to see whether the timer
** queue is empty
**
-** Parameters
+** Parameters
**
** Returns BOOLEAN
**
@@ -591,7 +591,7 @@ void GKI_timer_update (INT32 ticks_since_last_update)
BOOLEAN GKI_timer_queue_empty (void)
{
UINT8 tt;
-
+
for (tt = 0; tt < GKI_MAX_TIMER_QUEUES; tt++)
{
if (gki_cb.com.timer_queues[tt])
@@ -606,8 +606,8 @@ BOOLEAN GKI_timer_queue_empty (void)
** Function GKI_timer_queue_register_callback
**
** Description This function is called by applications to register system tick
-** start/stop callback for time queues
-**
+** start/stop callback for time queues
+**
**
** Parameters p_callback - (input) pointer to the system tick callback
**
@@ -617,7 +617,7 @@ BOOLEAN GKI_timer_queue_empty (void)
void GKI_timer_queue_register_callback (SYSTEM_TICK_CBACK *p_callback)
{
gki_cb.com.p_tick_cb = p_callback;
-
+
return;
}
@@ -727,7 +727,7 @@ UINT16 GKI_update_timer_list (TIMER_LIST_Q *p_timer_listq, INT32 num_units_since
p_timer_listq->last_ticks -= num_units_since_last_update;
/* If the last timer has expired set last_ticks to 0 so that other list update
- * functions will calculate correctly
+ * functions will calculate correctly
*/
if (p_timer_listq->last_ticks < 0)
p_timer_listq->last_ticks = 0;
@@ -740,7 +740,7 @@ UINT16 GKI_update_timer_list (TIMER_LIST_Q *p_timer_listq, INT32 num_units_since
**
** Function GKI_get_remaining_ticks
**
-** Description This function is called by an application to get remaining
+** Description This function is called by an application to get remaining
** ticks to expire
**
** Parameters p_timer_listq - (input) pointer to the timer list queue object
@@ -806,7 +806,7 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
UINT32 nr_ticks_total;
UINT8 tt;
TIMER_LIST_ENT *p_temp;
-
+
/* Only process valid tick values */
if (p_tle->ticks >= 0)
{
@@ -821,15 +821,15 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
/* Insert the entry onto the end of the list */
if (p_timer_listq->p_last != NULL)
p_timer_listq->p_last->p_next = p_tle;
-
+
p_tle->p_prev = p_timer_listq->p_last;
}
-
+
p_tle->p_next = NULL;
p_timer_listq->p_last = p_tle;
nr_ticks_total = p_tle->ticks;
p_tle->ticks -= p_timer_listq->last_ticks;
-
+
p_timer_listq->last_ticks = nr_ticks_total;
}
else /* This entry needs to be inserted before the last entry */
@@ -844,7 +844,7 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
p_temp = p_temp->p_next;
}
-
+
/* The new entry is the first in the list */
if (p_temp == p_timer_listq->p_first)
{
@@ -876,7 +876,7 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
if (gki_cb.com.timer_queues[tt] == NULL)
break;
}
- if (tt < GKI_MAX_TIMER_QUEUES)
+ if (tt < GKI_MAX_TIMER_QUEUES)
{
gki_cb.com.timer_queues[tt] = p_timer_listq;
}
@@ -1006,7 +1006,7 @@ void gki_adjust_timer_count (INT32 ticks)
{
/* See if the new timer expires before the current first expiration */
if (gki_cb.com.OSNumOrigTicks == 0 || (ticks < gki_cb.com.OSTicksTilExp && gki_cb.com.OSTicksTilExp > 0))
- {
+ {
gki_cb.com.OSNumOrigTicks = (gki_cb.com.OSNumOrigTicks - gki_cb.com.OSTicksTilExp) + ticks;
gki_cb.com.OSTicksTilExp = ticks;
}