Searched refs:sframe (Results 1 – 5 of 5) sorted by relevance
/Zephyr-Core-3.5.0/include/zephyr/net/ |
D | socketcan_utils.h | 36 static inline void socketcan_to_can_frame(const struct socketcan_frame *sframe, in socketcan_to_can_frame() argument 41 zframe->flags |= (sframe->can_id & BIT(31)) != 0 ? CAN_FRAME_IDE : 0; in socketcan_to_can_frame() 42 zframe->flags |= (sframe->can_id & BIT(30)) != 0 ? CAN_FRAME_RTR : 0; in socketcan_to_can_frame() 43 zframe->flags |= (sframe->flags & CANFD_FDF) != 0 ? CAN_FRAME_FDF : 0; in socketcan_to_can_frame() 44 zframe->flags |= (sframe->flags & CANFD_BRS) != 0 ? CAN_FRAME_BRS : 0; in socketcan_to_can_frame() 45 zframe->id = sframe->can_id & BIT_MASK(29); in socketcan_to_can_frame() 46 zframe->dlc = can_bytes_to_dlc(sframe->len); in socketcan_to_can_frame() 49 memcpy(zframe->data, sframe->data, in socketcan_to_can_frame() 50 MIN(sframe->len, MIN(sizeof(sframe->data), sizeof(zframe->data)))); in socketcan_to_can_frame() 61 struct socketcan_frame *sframe) in socketcan_from_can_frame() argument [all …]
|
/Zephyr-Core-3.5.0/tests/net/socket/can/src/ |
D | main.c | 20 struct socketcan_frame sframe = { 0 }; in ZTEST() local 26 sframe.can_id = BIT(31) | 1234; in ZTEST() 27 sframe.len = sizeof(data); in ZTEST() 28 memcpy(sframe.data, data, sizeof(sframe.data)); in ZTEST() 35 socketcan_to_can_frame(&sframe, &zframe); in ZTEST() 37 LOG_HEXDUMP_DBG((const uint8_t *)&sframe, sizeof(sframe), "sframe"); in ZTEST() 48 sframe.can_id |= BIT(30); in ZTEST() 51 socketcan_to_can_frame(&sframe, &zframe); in ZTEST() 62 struct socketcan_frame sframe = { 0 }; in ZTEST() local 77 socketcan_from_can_frame(&zframe, &sframe); in ZTEST() [all …]
|
/Zephyr-Core-3.5.0/samples/net/sockets/can/src/ |
D | main.c | 46 struct socketcan_frame sframe = {0}; in tx() local 56 socketcan_from_can_frame(&zframe, &sframe); in tx() 61 ret = send(fd, &sframe, sizeof(sframe), 0); in tx() 106 struct socketcan_frame sframe; in rx() local 114 memset(&sframe, 0, sizeof(sframe)); in rx() 117 ret = recvfrom(fd, &sframe, sizeof(struct socketcan_frame), in rx() 125 socketcan_to_can_frame(&sframe, &zframe); in rx()
|
/Zephyr-Core-3.5.0/drivers/can/ |
D | can_native_posix_linux.c | 80 struct socketcan_frame sframe; in rx_thread() local 92 count = linux_socketcan_read_data(data->dev_fd, (void *)(&sframe), in rx_thread() 93 sizeof(sframe), &msg_confirm); in rx_thread() 106 socketcan_to_can_frame(&sframe, &frame); in rx_thread() 125 struct socketcan_frame sframe; in can_npl_send() local 173 socketcan_from_can_frame(frame, &sframe); in can_npl_send() 182 ret = linux_socketcan_write_data(data->dev_fd, &sframe, mtu); in can_npl_send() 184 LOG_ERR("Cannot send CAN data len %d (%d)", sframe.len, -errno); in can_npl_send()
|
/Zephyr-Core-3.5.0/subsys/net/lib/sockets/ |
D | sockets_can.c | 110 struct socketcan_frame sframe; in zcan_received_cb() local 117 socketcan_from_can_frame(zframe, &sframe); in zcan_received_cb() 119 if ((sframe.can_id & receivers[i].can_mask) != in zcan_received_cb()
|