Lines Matching +full:29 +full:- +full:bit

10  * SPDX-License-Identifier: Apache-2.0
40 zframe->flags |= (sframe->can_id & BIT(31)) != 0 ? CAN_FRAME_IDE : 0; in socketcan_to_can_frame()
41 zframe->flags |= (sframe->can_id & BIT(30)) != 0 ? CAN_FRAME_RTR : 0; in socketcan_to_can_frame()
42 zframe->flags |= (sframe->flags & CANFD_FDF) != 0 ? CAN_FRAME_FDF : 0; in socketcan_to_can_frame()
43 zframe->flags |= (sframe->flags & CANFD_BRS) != 0 ? CAN_FRAME_BRS : 0; in socketcan_to_can_frame()
44 zframe->id = sframe->can_id & BIT_MASK(29); in socketcan_to_can_frame()
45 zframe->dlc = can_bytes_to_dlc(sframe->len); in socketcan_to_can_frame()
47 if ((zframe->flags & CAN_FRAME_RTR) == 0U) { in socketcan_to_can_frame()
48 memcpy(zframe->data, sframe->data, in socketcan_to_can_frame()
49 MIN(sframe->len, MIN(sizeof(sframe->data), sizeof(zframe->data)))); in socketcan_to_can_frame()
64 sframe->can_id = zframe->id; in socketcan_from_can_frame()
65 sframe->can_id |= (zframe->flags & CAN_FRAME_IDE) != 0 ? BIT(31) : 0; in socketcan_from_can_frame()
66 sframe->can_id |= (zframe->flags & CAN_FRAME_RTR) != 0 ? BIT(30) : 0; in socketcan_from_can_frame()
67 sframe->len = can_dlc_to_bytes(zframe->dlc); in socketcan_from_can_frame()
69 if ((zframe->flags & CAN_FRAME_FDF) != 0) { in socketcan_from_can_frame()
70 sframe->flags |= CANFD_FDF; in socketcan_from_can_frame()
73 if ((zframe->flags & CAN_FRAME_BRS) != 0) { in socketcan_from_can_frame()
74 sframe->flags |= CANFD_BRS; in socketcan_from_can_frame()
77 if ((zframe->flags & CAN_FRAME_RTR) == 0U) { in socketcan_from_can_frame()
78 memcpy(sframe->data, zframe->data, in socketcan_from_can_frame()
79 MIN(sframe->len, MIN(sizeof(zframe->data), sizeof(sframe->data)))); in socketcan_from_can_frame()
94 zfilter->flags |= (sfilter->can_id & BIT(31)) != 0 ? CAN_FILTER_IDE : 0; in socketcan_to_can_filter()
95 zfilter->id = sfilter->can_id & BIT_MASK(29); in socketcan_to_can_filter()
96 zfilter->mask = sfilter->can_mask & BIT_MASK(29); in socketcan_to_can_filter()
110 sfilter->can_id = zfilter->id; in socketcan_from_can_filter()
111 sfilter->can_id |= (zfilter->flags & CAN_FILTER_IDE) != 0 ? BIT(31) : 0; in socketcan_from_can_filter()
113 sfilter->can_mask = zfilter->mask; in socketcan_from_can_filter()
114 sfilter->can_mask |= (zfilter->flags & CAN_FILTER_IDE) != 0 ? BIT(31) : 0; in socketcan_from_can_filter()
117 sfilter->can_mask |= BIT(30); in socketcan_from_can_filter()