Lines Matching refs:tx_addr
144 prepare_frame(&frame, &rctx->tx_addr); in receive_send_fc()
146 if ((rctx->tx_addr.flags & ISOTP_MSG_EXT_ADDR) != 0) { in receive_send_fc()
147 *data++ = rctx->tx_addr.ext_addr; in receive_send_fc()
400 rctx->tx_addr.ext_id &= ~(ISOTP_FIXED_ADDR_TA_MASK); in process_ff_sf()
401 rctx->tx_addr.ext_id |= rx_sa << ISOTP_FIXED_ADDR_TA_POS; in process_ff_sf()
404 rctx->tx_addr.ext_id &= ~(ISOTP_FIXED_ADDR_PRIO_MASK); in process_ff_sf()
405 rctx->tx_addr.ext_id |= frame->id & ISOTP_FIXED_ADDR_PRIO_MASK; in process_ff_sf()
617 const struct isotp_msg_id *tx_addr, in isotp_bind() argument
626 __ASSERT(rx_addr && tx_addr, "RX or TX addr is NULL"); in isotp_bind()
631 rctx->tx_addr = *tx_addr; in isotp_bind()
641 if ((rx_addr->flags & ISOTP_MSG_FDF) != 0 || (tx_addr->flags & ISOTP_MSG_FDF) != 0) { in isotp_bind()
650 rctx->rx_addr.ext_id, rctx->tx_addr.ext_id); in isotp_bind()
903 prepare_frame(&frame, &sctx->tx_addr); in send_sf()
908 if ((sctx->tx_addr.flags & ISOTP_MSG_EXT_ADDR) != 0) { in send_sf()
909 frame.data[index++] = sctx->tx_addr.ext_addr; in send_sf()
912 if (IS_ENABLED(CONFIG_CAN_FD_MODE) && (sctx->tx_addr.flags & ISOTP_MSG_FDF) != 0 && in send_sf()
920 if (len > sctx->tx_addr.dl - index) { in send_sf()
928 (IS_ENABLED(CONFIG_CAN_FD_MODE) && (sctx->tx_addr.flags & ISOTP_MSG_FDF) != 0 && in send_sf()
954 prepare_frame(&frame, &sctx->tx_addr); in send_ff()
956 frame.dlc = can_bytes_to_dlc(sctx->tx_addr.dl); in send_ff()
958 if ((sctx->tx_addr.flags & ISOTP_MSG_EXT_ADDR) != 0) { in send_ff()
959 frame.data[index++] = sctx->tx_addr.ext_addr; in send_ff()
979 pull_send_ctx_data(sctx, sctx->tx_addr.dl - index); in send_ff()
980 memcpy(&frame.data[index], data, sctx->tx_addr.dl - index); in send_ff()
995 prepare_frame(&frame, &sctx->tx_addr); in send_cf()
997 if ((sctx->tx_addr.flags & ISOTP_MSG_EXT_ADDR) != 0) { in send_cf()
998 frame.data[index++] = sctx->tx_addr.ext_addr; in send_cf()
1005 len = MIN(rem_len, sctx->tx_addr.dl - index); in send_cf()
1011 (IS_ENABLED(CONFIG_CAN_FD_MODE) && (sctx->tx_addr.flags & ISOTP_MSG_FDF) != 0 && in send_cf()
1193 const struct isotp_msg_id *tx_addr, in send() argument
1203 __ASSERT_NO_MSG(rx_addr && tx_addr); in send()
1205 if ((rx_addr->flags & ISOTP_MSG_FDF) != 0 || (tx_addr->flags & ISOTP_MSG_FDF) != 0) { in send()
1224 sctx->tx_addr = *tx_addr; in send()
1231 switch (sctx->tx_addr.dl) { in send()
1233 if ((sctx->tx_addr.flags & ISOTP_MSG_FDF) == 0) { in send()
1234 sctx->tx_addr.dl = 8; in send()
1236 sctx->tx_addr.dl = 64; in send()
1248 if ((sctx->tx_addr.flags & ISOTP_MSG_FDF) == 0) { in send()
1254 LOG_ERR("Invalid TX_DL: %u", sctx->tx_addr.dl); in send()
1260 sctx->tx_addr.ext_id, sctx->rx_addr.ext_id); in send()
1262 if (len > sctx->tx_addr.dl - (((tx_addr->flags & ISOTP_MSG_EXT_ADDR) != 0) ? 2 : 1) - in send()
1263 ((sctx->tx_addr.dl > ISOTP_4BIT_SF_MAX_CAN_DL) ? 1 : 0)) { in send()
1297 const struct isotp_msg_id *tx_addr, in isotp_send() argument
1306 return send(sctx, can_dev, tx_addr, rx_addr, complete_cb, cb_arg); in isotp_send()
1313 const struct isotp_msg_id *tx_addr, in isotp_send_ctx_buf() argument
1332 return send(sctx, can_dev, tx_addr, rx_addr, complete_cb, cb_arg); in isotp_send_ctx_buf()
1337 const struct isotp_msg_id *tx_addr, in isotp_send_net_ctx_buf() argument
1355 return send(sctx, can_dev, tx_addr, rx_addr, complete_cb, cb_arg); in isotp_send_net_ctx_buf()
1361 const struct isotp_msg_id *tx_addr, in isotp_send_buf() argument
1388 return send(sctx, can_dev, tx_addr, rx_addr, complete_cb, cb_arg); in isotp_send_buf()