Skip to content

Commit

Permalink
os/board/rtl8721csm: change of BLE adv log API
Browse files Browse the repository at this point in the history
- change of log printing api from dbg to debug_print, to reduce default log printing when starting and stopping BLE adv

- Previous log:
	Start BLE adv
		ble_tizenrt_scatternet_handle_upstream_msg: [Upstream] Start Adv Success
		ble_tizenrt_scatternet_app_handle_dev_state_evt: init state  1, scan state 0, conn_state 0, adv_state 1, cause 0x0
		ble_tizenrt_scatternet_app_handle_dev_state_evt: init state  1, scan state 0, conn_state 0, adv_state 2, cause 0x0
		ble_tizenrt_scatternet_app_handle_dev_state_evt: GAP adv start
	Stop BLE adv
		ble_tizenrt_scatternet_handle_upstream_msg: [Upstream] Stop Adv Success
		ble_tizenrt_scatternet_app_handle_dev_state_evt: init state  1, scan state 0, conn_state 0, adv_state 3, cause 0x0
		ble_tizenrt_scatternet_app_handle_dev_state_evt: init state  1, scan state 0, conn_state 0, adv_state 0, cause 0x0
		ble_tizenrt_scatternet_app_handle_dev_state_evt: GAP adv stopped

- Log after this commit:
	Start BLE adv:
		ble_tizenrt_scatternet_app_handle_dev_state_evt: init state  1, scan state 0, conn_state 0, adv_state 1, cause 0x0
		ble_tizenrt_scatternet_app_handle_dev_state_evt: init state  1, scan state 0, conn_state 0, adv_state 2, cause 0x0
	Stop BLE adv:
		ble_tizenrt_scatternet_app_handle_dev_state_evt: init state  1, scan state 0, conn_state 0, adv_state 3, cause 0x0
		ble_tizenrt_scatternet_app_handle_dev_state_evt: init state  1, scan state 0, conn_state 0, adv_state 0, cause 0x0
  • Loading branch information
yeetee179 authored and hs36-kim committed Oct 25, 2024
1 parent 242d998 commit 4e85050
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,18 +485,18 @@ int ble_tizenrt_scatternet_handle_upstream_msg(uint16_t subtype, void *pdata)
case BLE_TIZENRT_MSG_START_ADV:
{
ret = le_adv_start();
if(GAP_CAUSE_SUCCESS == ret)
dbg("[Upstream] Start Adv Success \n");
else
dbg("[Upstream] Start Adv Fail !! 0x%x \n", ret);
if(GAP_CAUSE_SUCCESS == ret)
debug_print("[Upstream] Start Adv Success \n");
else
dbg("[Upstream] Start Adv Fail !! 0x%x \n", ret);
}
break;
case BLE_TIZENRT_MSG_STOP_ADV:
ret = le_adv_stop();
if(GAP_CAUSE_SUCCESS == ret)
dbg("[Upstream] Stop Adv Success \n");
else
dbg("[Upstream] Stop Adv Fail !! 0x%x \n", ret);
if(GAP_CAUSE_SUCCESS == ret)
debug_print("[Upstream] Stop Adv Success \n");
else
dbg("[Upstream] Stop Adv Fail !! 0x%x \n", ret);
break;
case BLE_TIZENRT_MSG_DISCONNECT:
{
Expand Down Expand Up @@ -735,13 +735,13 @@ void ble_tizenrt_scatternet_app_handle_dev_state_evt(T_GAP_DEV_STATE new_state,
}
else
{
dbg("GAP adv stopped \n");
debug_print("GAP adv stopped \n");
}
ble_tizenrt_scatternet_gap_dev_state.gap_adv_sub_state = new_state.gap_adv_sub_state;
}
else if (new_state.gap_adv_state == GAP_ADV_STATE_ADVERTISING)
{
dbg("GAP adv start \n");
debug_print("GAP adv start \n");
}
ble_tizenrt_scatternet_gap_dev_state.gap_adv_state = new_state.gap_adv_state;
}
Expand Down

0 comments on commit 4e85050

Please sign in to comment.