Home
last modified time | relevance | path

Searched refs:dlc (Results 1 – 25 of 37) sorted by relevance

12

/Zephyr-latest/subsys/bluetooth/host/classic/
Drfcomm.c221 static void rfcomm_dlc_tx_give_credits(struct bt_rfcomm_dlc *dlc, in rfcomm_dlc_tx_give_credits() argument
224 LOG_DBG("dlc %p credits %u", dlc, credits); in rfcomm_dlc_tx_give_credits()
227 k_sem_give(&dlc->tx_credits); in rfcomm_dlc_tx_give_credits()
230 LOG_DBG("dlc %p updated credits %u", dlc, k_sem_count_get(&dlc->tx_credits)); in rfcomm_dlc_tx_give_credits()
233 static void rfcomm_dlc_destroy(struct bt_rfcomm_dlc *dlc) in rfcomm_dlc_destroy() argument
235 LOG_DBG("dlc %p", dlc); in rfcomm_dlc_destroy()
237 k_work_cancel_delayable(&dlc->rtx_work); in rfcomm_dlc_destroy()
238 dlc->state = BT_RFCOMM_STATE_IDLE; in rfcomm_dlc_destroy()
239 dlc->session = NULL; in rfcomm_dlc_destroy()
241 if (dlc->ops && dlc->ops->disconnected) { in rfcomm_dlc_destroy()
[all …]
Dhfp_hf.c684 static void hfp_hf_connected(struct bt_rfcomm_dlc *dlc) in hfp_hf_connected() argument
686 struct bt_hfp_hf *hf = CONTAINER_OF(dlc, struct bt_hfp_hf, rfcomm_dlc); in hfp_hf_connected()
694 static void hfp_hf_disconnected(struct bt_rfcomm_dlc *dlc) in hfp_hf_disconnected() argument
696 struct bt_hfp_hf *hf = CONTAINER_OF(dlc, struct bt_hfp_hf, rfcomm_dlc); in hfp_hf_disconnected()
705 static void hfp_hf_recv(struct bt_rfcomm_dlc *dlc, struct net_buf *buf) in hfp_hf_recv() argument
707 struct bt_hfp_hf *hf = CONTAINER_OF(dlc, struct bt_hfp_hf, rfcomm_dlc); in hfp_hf_recv()
714 static void hfp_hf_sent(struct bt_rfcomm_dlc *dlc, int err) in hfp_hf_sent() argument
716 LOG_DBG("DLC %p sent cb (err %d)", dlc, err); in hfp_hf_sent()
719 static int bt_hfp_hf_accept(struct bt_conn *conn, struct bt_rfcomm_dlc **dlc) in bt_hfp_hf_accept() argument
746 *dlc = &hf->rfcomm_dlc; in bt_hfp_hf_accept()
/Zephyr-latest/include/zephyr/bluetooth/classic/
Drfcomm.h47 void (*connected)(struct bt_rfcomm_dlc *dlc);
57 void (*disconnected)(struct bt_rfcomm_dlc *dlc);
64 void (*recv)(struct bt_rfcomm_dlc *dlc, struct net_buf *buf);
71 void (*sent)(struct bt_rfcomm_dlc *dlc, int err);
125 int (*accept)(struct bt_conn *conn, struct bt_rfcomm_dlc **dlc);
154 int bt_rfcomm_dlc_connect(struct bt_conn *conn, struct bt_rfcomm_dlc *dlc,
167 int bt_rfcomm_dlc_send(struct bt_rfcomm_dlc *dlc, struct net_buf *buf);
178 int bt_rfcomm_dlc_disconnect(struct bt_rfcomm_dlc *dlc);
/Zephyr-latest/tests/drivers/can/api/src/
Dcommon.c31 .dlc = 8,
41 .dlc = 8,
51 .dlc = 8,
61 .dlc = 8,
71 .dlc = 0,
81 .dlc = 0,
92 .dlc = 0xf,
106 .dlc = 0xf,
218 zassert_equal(frame1->dlc, frame2->dlc, "DLC does not match"); in assert_frame_equal()
221 zassert_mem_equal(frame1->data, frame2->data, can_dlc_to_bytes(frame1->dlc), in assert_frame_equal()
Dutilities.c25 uint8_t dlc; in ZTEST() local
28 for (dlc = 0; dlc <= 8; dlc++) { in ZTEST()
29 zassert_equal(can_dlc_to_bytes(dlc), dlc, "wrong number of bytes for DLC %u", dlc); in ZTEST()
/Zephyr-latest/tests/net/socket/can/src/
Dmain.c32 expected.dlc = can_bytes_to_dlc(sizeof(data)); in ZTEST()
43 zassert_equal(zframe.dlc, expected.dlc, "Msg length invalid"); in ZTEST()
44 zassert_mem_equal(&zframe.data, &expected.data, can_dlc_to_bytes(expected.dlc), in ZTEST()
74 zframe.dlc = can_bytes_to_dlc(sizeof(data)); in ZTEST()
/Zephyr-latest/samples/net/sockets/can/src/
Dmain.c54 zframe.dlc = 8U; in tx()
56 for (i = 0; i < zframe.dlc; i++) { in tx()
137 zframe.id, zframe.dlc); in rx()
142 if (zframe.dlc > 8) { in rx()
148 LOG_HEXDUMP_INF(data, zframe.dlc, "Data"); in rx()
/Zephyr-latest/tests/drivers/can/shell/src/
Dmain.c52 zassert_equal(f1->dlc, f2->dlc, "dlc mismatch"); in assert_can_frame_equal()
53 zassert_mem_equal(f1->data, f2->data, can_dlc_to_bytes(f1->dlc), "data mismatch"); in assert_can_frame_equal()
384 .dlc = can_bytes_to_dlc(2), in ZTEST()
396 .dlc = can_bytes_to_dlc(4), in ZTEST()
408 .dlc = can_bytes_to_dlc(0), in ZTEST()
420 .dlc = can_bytes_to_dlc(0), in ZTEST()
432 .dlc = can_bytes_to_dlc(8), in ZTEST()
444 .dlc = can_bytes_to_dlc(7), in ZTEST()
456 .dlc = can_bytes_to_dlc(0), in ZTEST()
/Zephyr-latest/samples/subsys/logging/syst/src/
Dmain.c26 uint8_t dlc; member
76 frame.dlc = sizeof(data); in log_msgs()
/Zephyr-latest/samples/drivers/can/counter/src/
Dmain.c83 if (frame.dlc != 2U) { in rx_thread()
84 printf("Wrong data length: %u\n", frame.dlc); in rx_thread()
200 .dlc = 1 in main()
205 .dlc = 2 in main()
/Zephyr-latest/drivers/can/
Dcan_sja1000.c288 frame->dlc = CAN_SJA1000_FRAME_INFO_DLC_GET(info); in can_sja1000_read_frame()
289 if (frame->dlc > CAN_MAX_DLC) { in can_sja1000_read_frame()
290 LOG_ERR("RX frame DLC %u exceeds maximum (%d)", frame->dlc, CAN_MAX_DLC); in can_sja1000_read_frame()
308 for (i = 0; i < frame->dlc; i++) { in can_sja1000_read_frame()
321 for (i = 0; i < frame->dlc; i++) { in can_sja1000_read_frame()
335 info = CAN_SJA1000_FRAME_INFO_DLC_PREP(frame->dlc); in can_sja1000_write_frame()
359 for (i = 0; i < frame->dlc; i++) { in can_sja1000_write_frame()
372 for (i = 0; i < frame->dlc; i++) { in can_sja1000_write_frame()
387 if (frame->dlc > CAN_MAX_DLC) { in can_sja1000_send()
388 LOG_ERR("TX frame DLC %u exceeds maximum (%d)", frame->dlc, CAN_MAX_DLC); in can_sja1000_send()
Dcan_sja1000_priv.h152 #define CAN_SJA1000_FRAME_INFO_DLC_PREP(dlc) FIELD_PREP(CAN_SJA1000_FRAME_INFO_DLC_MASK, dlc) argument
Dcan_mcp2515.c204 uint8_t dlc; in mcp2515_convert_canframe_to_mcp2515frame() local
221 dlc = (source->dlc) & 0x0F; in mcp2515_convert_canframe_to_mcp2515frame()
223 target[MCP2515_FRAME_OFFSET_DLC] = rtr | dlc; in mcp2515_convert_canframe_to_mcp2515frame()
226 for (data_idx = 0U; data_idx < dlc; data_idx++) { in mcp2515_convert_canframe_to_mcp2515frame()
253 target->dlc = source[MCP2515_FRAME_OFFSET_DLC] & 0x0F; in mcp2515_convert_mcp2515frame_to_canframe()
258 for (data_idx = 0U; data_idx < target->dlc; data_idx++) { in mcp2515_convert_mcp2515frame_to_canframe()
540 if (frame->dlc > CAN_MAX_DLC) { in mcp2515_send()
542 frame->dlc, CAN_MAX_DLC); in mcp2515_send()
585 len = sizeof(tx_frame) - CAN_MAX_DLC + frame->dlc; in mcp2515_send()
Dcan_loopback.c55 frame->dlc, frame->id, in receive_frame()
116 frame->dlc, dev->name, frame->id, in can_loopback_send()
141 if (frame->dlc > max_dlc) { in can_loopback_send()
142 LOG_ERR("DLC of %d exceeds maximum (%d)", frame->dlc, max_dlc); in can_loopback_send()
Dcan_native_linux.c119 frame.dlc, frame.id, in rx_thread()
141 frame->dlc, dev->name, frame->id, in can_native_linux_send()
167 if (frame->dlc > max_dlc) { in can_native_linux_send()
168 LOG_ERR("DLC of %d exceeds maximum (%d)", frame->dlc, max_dlc); in can_native_linux_send()
Dcan_rcar.c399 frame.dlc = sys_read16(config->reg_addr + in can_rcar_rx_isr()
405 if (frame.dlc > CAN_MAX_DLC) { in can_rcar_rx_isr()
406 frame.dlc = CAN_MAX_DLC; in can_rcar_rx_isr()
412 for (i = 0; i < frame.dlc; i++) { in can_rcar_rx_isr()
885 , frame->dlc, dev->name in can_rcar_send()
891 if (frame->dlc > CAN_MAX_DLC) { in can_rcar_send()
893 frame->dlc, CAN_MAX_DLC); in can_rcar_send()
933 sys_write16(frame->dlc, config->reg_addr in can_rcar_send()
937 for (i = 0; i < frame->dlc; i++) { in can_rcar_send()
Dcan_nxp_s32_canxl.c579 uint8_t data_length = can_dlc_to_bytes(frame->dlc); in can_nxp_s32_send()
616 if (frame->dlc > CAN_MAX_DLC) { in can_nxp_s32_send()
617 LOG_ERR("DLC of %d for non-FD format frame", frame->dlc); in can_nxp_s32_send()
622 if (frame->dlc > CANFD_MAX_DLC) { in can_nxp_s32_send()
623 LOG_ERR("DLC of %d for CAN FD format frame", frame->dlc); in can_nxp_s32_send()
848 frame->dlc = (msg_data.Header.Control & CANXL_TX_HEADER_DLC_MASK) in nxp_s32_msg_data_to_zcan_frame()
862 memcpy(frame->data, msg_data.data, can_dlc_to_bytes(frame->dlc)); in nxp_s32_msg_data_to_zcan_frame()
906 dev->name, can_dlc_to_bytes(frame.dlc), in can_nxp_s32_ctrl_callback()
930 dev->name, can_dlc_to_bytes(frame.dlc), in can_nxp_s32_ctrl_callback()
Dcan_mcan.c713 frame.dlc = hdr.dlc; in can_mcan_get_message()
744 data_length = can_dlc_to_bytes(frame.dlc); in can_mcan_get_message()
910 size_t data_length = can_dlc_to_bytes(frame->dlc); in can_mcan_send()
915 .dlc = frame->dlc, in can_mcan_send()
961 if (frame->dlc > CANFD_MAX_DLC) { in can_mcan_send()
962 LOG_ERR("DLC of %d for CAN FD format frame", frame->dlc); in can_mcan_send()
966 if (frame->dlc > CAN_MAX_DLC) { in can_mcan_send()
967 LOG_ERR("DLC of %d for non-FD format frame", frame->dlc); in can_mcan_send()
Dcan_renesas_ra.c348 .dlc = can_bytes_to_dlc(p_args->frame.data_length_code), in can_renesas_ra_call_rx_cb()
581 if (frame->dlc > CANFD_MAX_DLC) { in can_renesas_ra_send()
582 LOG_ERR("DLC of %d for CAN FD format frame", frame->dlc); in can_renesas_ra_send()
586 if (frame->dlc > CAN_MAX_DLC) { in can_renesas_ra_send()
587 LOG_ERR("DLC of %d for non-FD format frame", frame->dlc); in can_renesas_ra_send()
608 .data_length_code = can_dlc_to_bytes(frame->dlc), in can_renesas_ra_send()
Dcan_mcp251xfd.c40 dst->flags |= FIELD_PREP(MCP251XFD_OBJ_FLAGS_DLC_MASK, src->dlc); in mcp251xfd_canframe_to_txobj()
54 memcpy(dst->data, src->data, MIN(can_dlc_to_bytes(src->dlc), CAN_MAX_DLEN)); in mcp251xfd_canframe_to_txobj()
188 tx_len += ROUND_UP(can_dlc_to_bytes(msg->dlc), MCP251XFD_RAM_ALIGNMENT); in mcp251xfd_fifo_write()
228 dst->dlc = FIELD_GET(MCP251XFD_OBJ_FLAGS_DLC_MASK, src->flags); in mcp251xfd_rxobj_to_canframe()
237 memcpy(dst->data, src->data, MIN(can_dlc_to_bytes(dst->dlc), CAN_MAX_DLEN)); in mcp251xfd_rxobj_to_canframe()
490 LOG_DBG("Sending %d bytes. Id: 0x%x, ID type: %s %s %s %s", can_dlc_to_bytes(msg->dlc), in mcp251xfd_send()
504 if ((msg->flags & CAN_FRAME_FDF) == 0 && msg->dlc > CAN_MAX_DLC) { in mcp251xfd_send()
505 LOG_ERR("DLC of %d without fd flag set.", msg->dlc); in mcp251xfd_send()
/Zephyr-latest/include/zephyr/net/
Dsocketcan_utils.h45 zframe->dlc = can_bytes_to_dlc(sframe->len); in socketcan_to_can_frame()
67 sframe->len = can_dlc_to_bytes(zframe->dlc); in socketcan_from_can_frame()
/Zephyr-latest/tests/drivers/can/host/pytest/
Dcan_shell.py180 dlc = int(m.group('dlc'))
186 data=data, dlc=dlc,
/Zephyr-latest/subsys/bluetooth/host/classic/shell/
Drfcomm.c128 static int rfcomm_accept(struct bt_conn *conn, struct bt_rfcomm_dlc **dlc) in rfcomm_accept() argument
137 *dlc = &rfcomm_dlc; in rfcomm_accept()
/Zephyr-latest/subsys/canbus/isotp/
Disotp.c159 frame.dlc = can_bytes_to_dlc(ISOTP_PADDED_FRAME_DL_MIN); in receive_send_fc()
161 frame.dlc = can_bytes_to_dlc(payload_len); in receive_send_fc()
386 uint8_t can_dl = can_dlc_to_bytes(frame->dlc); in process_ff_sf()
489 uint8_t can_dl = can_dlc_to_bytes(frame->dlc); in process_cf()
809 if (frame->dlc < ISOTP_PADDED_FRAME_DL_MIN) { in send_process_fc()
933 frame.dlc = can_bytes_to_dlc( in send_sf()
936 can_dlc_to_bytes(frame.dlc) - len - index); in send_sf()
938 frame.dlc = can_bytes_to_dlc(len + index); in send_sf()
956 frame.dlc = can_bytes_to_dlc(sctx->tx_addr.dl); in send_ff()
1016 frame.dlc = can_bytes_to_dlc( in send_cf()
[all …]
/Zephyr-latest/modules/canopennode/
DCO_driver.c113 rxMsg.DLC = frame->dlc; in canopen_rx_callback()
114 memcpy(rxMsg.data, frame->data, frame->dlc); in canopen_rx_callback()
160 frame.dlc = buffer->DLC; in canopen_tx_retry()
412 frame.dlc = buffer->DLC; in CO_CANsend()

12