Skip to content

Commit 82e5358

Browse files
committed
Update Zephyr to v3.6.0
1 parent 51ddc0d commit 82e5358

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

examples/zephyr-drivers-can/src/main.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void rx_thread(void *arg1, void *arg2, void *arg3)
6363
ARG_UNUSED(arg2);
6464
ARG_UNUSED(arg3);
6565
const struct can_filter filter = {
66-
.flags = CAN_FILTER_DATA | CAN_FILTER_IDE,
66+
.flags = CAN_FILTER_IDE,
6767
.id = COUNTER_MSG_ID,
6868
.mask = CAN_EXT_ID_MASK
6969
};
@@ -76,6 +76,10 @@ void rx_thread(void *arg1, void *arg2, void *arg3)
7676
while (1) {
7777
k_msgq_get(&counter_msgq, &frame, K_FOREVER);
7878

79+
if (IS_ENABLED(CONFIG_CAN_ACCEPT_RTR) && (frame.flags & CAN_FRAME_RTR) != 0U) {
80+
continue;
81+
}
82+
7983
if (frame.dlc != 2U) {
8084
printf("Wrong data length: %u\n", frame.dlc);
8185
continue;
@@ -92,6 +96,10 @@ void change_led_work_handler(struct k_work *work)
9296
int ret;
9397

9498
while (k_msgq_get(&change_led_msgq, &frame, K_NO_WAIT) == 0) {
99+
if (IS_ENABLED(CONFIG_CAN_ACCEPT_RTR) && (frame.flags & CAN_FRAME_RTR) != 0U) {
100+
continue;
101+
}
102+
95103
if (led.port == NULL) {
96104
printf("LED %s\n", frame.data[0] == SET_LED ? "ON" : "OFF");
97105
} else {
@@ -192,7 +200,7 @@ void state_change_callback(const struct device *dev, enum can_state state,
192200
int main(void)
193201
{
194202
const struct can_filter change_led_filter = {
195-
.flags = CAN_FILTER_DATA,
203+
.flags = 0U,
196204
.id = LED_MSG_ID,
197205
.mask = CAN_STD_ID_MASK
198206
};
@@ -230,7 +238,7 @@ int main(void)
230238
}
231239

232240
if (led.port != NULL) {
233-
if (!device_is_ready(led.port)) {
241+
if (!gpio_is_ready_dt(&led)) {
234242
printf("LED: Device %s not ready.\n",
235243
led.port->name);
236244
return 0;

platform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
"type": "framework",
299299
"optional": true,
300300
"owner": "platformio",
301-
"version": "~2.30500.0"
301+
"version": "~2.30600.0"
302302
},
303303
"tool-stm32duino": {
304304
"type": "uploader",

0 commit comments

Comments
 (0)