Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app: boards: add configuration for the mks_canable_v20 board #52

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/boards/makerbase/mks_canable_v20/mks_canable_v20.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The two lines below are needed to reduce flash usage
CONFIG_LTO=y
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
34 changes: 34 additions & 0 deletions app/boards/makerbase/mks_canable_v20/mks_canable_v20.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2024 Alexander Kozhinov <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/gpio/gpio.h>

/ {
cannectivity: cannectivity {
compatible = "cannectivity";
timestamp-counter = <&counters2>;

channel0 {
compatible = "cannectivity-channel";
can-controller = <&fdcan1>;
state-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; /* blue led */
activity-gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; /* green led */
};
};
};

&zephyr_udc0 {
gs_usb0: gs_usb0 {
compatible = "gs_usb";
};
};

&timers2 {
st,prescaler = <159>;
counters2: counter {
status = "okay";
};
};
1 change: 1 addition & 0 deletions app/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ tests:
- usb2canfdv1
- candlelight
- ucan
- mks_canable_v20
app.cannectivity.sof:
depends_on:
- usb_device
Expand Down