Loading system/bta/jv/bta_jv_act.cc +10 −10 Original line number Diff line number Diff line Loading @@ -1507,14 +1507,14 @@ void bta_jv_rfcomm_connect(tBTA_SEC sec_mask, uint8_t remote_scn, p_pcb->rfcomm_slot_id = rfcomm_slot_id; bta_jv.rfc_cl_init.use_co = true; if (PORT_SetEventMask(handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM client event mask handle:{}", handle); } if (PORT_SetEventCallback(handle, bta_jv_port_event_cl_cback) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM client event callback handle:{}", handle); } if (PORT_SetEventMask(handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM client event mask handle:{}", handle); } if (PORT_SetDataCOCallback(handle, bta_jv_port_data_co_cback) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM client data callback handle:{}", Loading Loading @@ -1772,6 +1772,10 @@ static tBTA_JV_PCB* bta_jv_add_rfc_port(tBTA_JV_RFC_CB* p_cb, log::warn("Unable to clear RFCOMM server keep handle flag handle:{}", p_pcb->port_handle); } if (PORT_SetEventMask(p_pcb->port_handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event mask handle:{}", p_pcb->port_handle); } if (PORT_SetEventCallback(p_pcb->port_handle, bta_jv_port_event_sr_cback) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event callback handle:{}", Loading @@ -1782,10 +1786,6 @@ static tBTA_JV_PCB* bta_jv_add_rfc_port(tBTA_JV_RFC_CB* p_cb, log::warn("Unable to set RFCOMM server data callback handle:{}", p_pcb->port_handle); } if (PORT_SetEventMask(p_pcb->port_handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event mask handle:{}", p_pcb->port_handle); } if (PORT_GetState(p_pcb->port_handle, &port_state) != PORT_SUCCESS) { log::warn("Unable to get RFCOMM server state handle:{}", p_pcb->port_handle); Loading Loading @@ -1854,14 +1854,14 @@ void bta_jv_rfcomm_start_server(tBTA_SEC sec_mask, uint8_t local_scn, log::warn("Unable to clear RFCOMM server keep handle flag handle:{}", handle); } if (PORT_SetEventMask(handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event mask handle:{}", handle); } if (PORT_SetEventCallback(handle, bta_jv_port_event_sr_cback) != PORT_SUCCESS) { log::warn("Unable to clear RFCOMM server event callback handle:{}", handle); } if (PORT_SetEventMask(handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event mask handle:{}", handle); } if (PORT_GetState(handle, &port_state) != PORT_SUCCESS) { log::warn("Unable to get RFCOMM server state handle:{}", handle); } Loading system/stack/include/port_api.h +13 −13 Original line number Diff line number Diff line Loading @@ -277,6 +277,19 @@ typedef void(tPORT_MGMT_CALLBACK)(const tPORT_RESULT code, ******************************************************************************/ [[nodiscard]] int RFCOMM_RemoveServer(uint16_t handle); /******************************************************************************* * * Function PORT_SetEventMask * * Description This function is called to close the specified connection. * * Parameters: handle - Handle of the port returned in the Open * mask - specifies events to be enabled. A value * of zero disables all events. * ******************************************************************************/ [[nodiscard]] int PORT_SetEventMask(uint16_t port_handle, uint32_t mask); /******************************************************************************* * * Function PORT_SetEventCallback Loading Loading @@ -306,19 +319,6 @@ typedef void(tPORT_MGMT_CALLBACK)(const tPORT_RESULT code, [[nodiscard]] int PORT_SetDataCOCallback(uint16_t port_handle, tPORT_DATA_CO_CALLBACK* p_port_cb); /******************************************************************************* * * Function PORT_SetEventMask * * Description This function is called to close the specified connection. * * Parameters: handle - Handle of the port returned in the Open * mask - specifies events to be enabled. A value * of zero disables all events. * ******************************************************************************/ [[nodiscard]] int PORT_SetEventMask(uint16_t port_handle, uint32_t mask); /******************************************************************************* * * Function PORT_CheckConnection Loading system/stack/rfcomm/port_api.cc +27 −27 Original line number Diff line number Diff line Loading @@ -371,6 +371,33 @@ int RFCOMM_RemoveServer(uint16_t handle) { return (PORT_SUCCESS); } /******************************************************************************* * * Function PORT_SetEventMask * * Description This function is called to close the specified connection. * * Parameters: handle - Handle returned in the RFCOMM_CreateConnection * mask - Bitmask of the events the host is interested in * ******************************************************************************/ int PORT_SetEventMask(uint16_t handle, uint32_t mask) { log::verbose("PORT_SetEventMask() handle:{} mask:0x{:x}", handle, mask); tPORT* p_port = get_port_from_handle(handle); if (p_port == nullptr) { log::error("Unable to get RFCOMM port control block bad handle:{}", handle); return (PORT_BAD_HANDLE); } if (!p_port->in_use || (p_port->state == PORT_CONNECTION_STATE_CLOSED)) { return (PORT_NOT_OPENED); } p_port->ev_mask = mask; return (PORT_SUCCESS); } /******************************************************************************* * * Function PORT_SetEventCallback Loading Loading @@ -454,33 +481,6 @@ int PORT_SetDataCOCallback(uint16_t handle, tPORT_DATA_CO_CALLBACK* p_port_cb) { return (PORT_SUCCESS); } /******************************************************************************* * * Function PORT_SetEventMask * * Description This function is called to close the specified connection. * * Parameters: handle - Handle returned in the RFCOMM_CreateConnection * mask - Bitmask of the events the host is interested in * ******************************************************************************/ int PORT_SetEventMask(uint16_t handle, uint32_t mask) { log::verbose("PORT_SetEventMask() handle:{} mask:0x{:x}", handle, mask); tPORT* p_port = get_port_from_handle(handle); if (p_port == nullptr) { log::error("Unable to get RFCOMM port control block bad handle:{}", handle); return (PORT_BAD_HANDLE); } if (!p_port->in_use || (p_port->state == PORT_CONNECTION_STATE_CLOSED)) { return (PORT_NOT_OPENED); } p_port->ev_mask = mask; return (PORT_SUCCESS); } /******************************************************************************* * * Function PORT_CheckConnection Loading Loading
system/bta/jv/bta_jv_act.cc +10 −10 Original line number Diff line number Diff line Loading @@ -1507,14 +1507,14 @@ void bta_jv_rfcomm_connect(tBTA_SEC sec_mask, uint8_t remote_scn, p_pcb->rfcomm_slot_id = rfcomm_slot_id; bta_jv.rfc_cl_init.use_co = true; if (PORT_SetEventMask(handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM client event mask handle:{}", handle); } if (PORT_SetEventCallback(handle, bta_jv_port_event_cl_cback) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM client event callback handle:{}", handle); } if (PORT_SetEventMask(handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM client event mask handle:{}", handle); } if (PORT_SetDataCOCallback(handle, bta_jv_port_data_co_cback) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM client data callback handle:{}", Loading Loading @@ -1772,6 +1772,10 @@ static tBTA_JV_PCB* bta_jv_add_rfc_port(tBTA_JV_RFC_CB* p_cb, log::warn("Unable to clear RFCOMM server keep handle flag handle:{}", p_pcb->port_handle); } if (PORT_SetEventMask(p_pcb->port_handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event mask handle:{}", p_pcb->port_handle); } if (PORT_SetEventCallback(p_pcb->port_handle, bta_jv_port_event_sr_cback) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event callback handle:{}", Loading @@ -1782,10 +1786,6 @@ static tBTA_JV_PCB* bta_jv_add_rfc_port(tBTA_JV_RFC_CB* p_cb, log::warn("Unable to set RFCOMM server data callback handle:{}", p_pcb->port_handle); } if (PORT_SetEventMask(p_pcb->port_handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event mask handle:{}", p_pcb->port_handle); } if (PORT_GetState(p_pcb->port_handle, &port_state) != PORT_SUCCESS) { log::warn("Unable to get RFCOMM server state handle:{}", p_pcb->port_handle); Loading Loading @@ -1854,14 +1854,14 @@ void bta_jv_rfcomm_start_server(tBTA_SEC sec_mask, uint8_t local_scn, log::warn("Unable to clear RFCOMM server keep handle flag handle:{}", handle); } if (PORT_SetEventMask(handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event mask handle:{}", handle); } if (PORT_SetEventCallback(handle, bta_jv_port_event_sr_cback) != PORT_SUCCESS) { log::warn("Unable to clear RFCOMM server event callback handle:{}", handle); } if (PORT_SetEventMask(handle, event_mask) != PORT_SUCCESS) { log::warn("Unable to set RFCOMM server event mask handle:{}", handle); } if (PORT_GetState(handle, &port_state) != PORT_SUCCESS) { log::warn("Unable to get RFCOMM server state handle:{}", handle); } Loading
system/stack/include/port_api.h +13 −13 Original line number Diff line number Diff line Loading @@ -277,6 +277,19 @@ typedef void(tPORT_MGMT_CALLBACK)(const tPORT_RESULT code, ******************************************************************************/ [[nodiscard]] int RFCOMM_RemoveServer(uint16_t handle); /******************************************************************************* * * Function PORT_SetEventMask * * Description This function is called to close the specified connection. * * Parameters: handle - Handle of the port returned in the Open * mask - specifies events to be enabled. A value * of zero disables all events. * ******************************************************************************/ [[nodiscard]] int PORT_SetEventMask(uint16_t port_handle, uint32_t mask); /******************************************************************************* * * Function PORT_SetEventCallback Loading Loading @@ -306,19 +319,6 @@ typedef void(tPORT_MGMT_CALLBACK)(const tPORT_RESULT code, [[nodiscard]] int PORT_SetDataCOCallback(uint16_t port_handle, tPORT_DATA_CO_CALLBACK* p_port_cb); /******************************************************************************* * * Function PORT_SetEventMask * * Description This function is called to close the specified connection. * * Parameters: handle - Handle of the port returned in the Open * mask - specifies events to be enabled. A value * of zero disables all events. * ******************************************************************************/ [[nodiscard]] int PORT_SetEventMask(uint16_t port_handle, uint32_t mask); /******************************************************************************* * * Function PORT_CheckConnection Loading
system/stack/rfcomm/port_api.cc +27 −27 Original line number Diff line number Diff line Loading @@ -371,6 +371,33 @@ int RFCOMM_RemoveServer(uint16_t handle) { return (PORT_SUCCESS); } /******************************************************************************* * * Function PORT_SetEventMask * * Description This function is called to close the specified connection. * * Parameters: handle - Handle returned in the RFCOMM_CreateConnection * mask - Bitmask of the events the host is interested in * ******************************************************************************/ int PORT_SetEventMask(uint16_t handle, uint32_t mask) { log::verbose("PORT_SetEventMask() handle:{} mask:0x{:x}", handle, mask); tPORT* p_port = get_port_from_handle(handle); if (p_port == nullptr) { log::error("Unable to get RFCOMM port control block bad handle:{}", handle); return (PORT_BAD_HANDLE); } if (!p_port->in_use || (p_port->state == PORT_CONNECTION_STATE_CLOSED)) { return (PORT_NOT_OPENED); } p_port->ev_mask = mask; return (PORT_SUCCESS); } /******************************************************************************* * * Function PORT_SetEventCallback Loading Loading @@ -454,33 +481,6 @@ int PORT_SetDataCOCallback(uint16_t handle, tPORT_DATA_CO_CALLBACK* p_port_cb) { return (PORT_SUCCESS); } /******************************************************************************* * * Function PORT_SetEventMask * * Description This function is called to close the specified connection. * * Parameters: handle - Handle returned in the RFCOMM_CreateConnection * mask - Bitmask of the events the host is interested in * ******************************************************************************/ int PORT_SetEventMask(uint16_t handle, uint32_t mask) { log::verbose("PORT_SetEventMask() handle:{} mask:0x{:x}", handle, mask); tPORT* p_port = get_port_from_handle(handle); if (p_port == nullptr) { log::error("Unable to get RFCOMM port control block bad handle:{}", handle); return (PORT_BAD_HANDLE); } if (!p_port->in_use || (p_port->state == PORT_CONNECTION_STATE_CLOSED)) { return (PORT_NOT_OPENED); } p_port->ev_mask = mask; return (PORT_SUCCESS); } /******************************************************************************* * * Function PORT_CheckConnection Loading