lagaði villu, vantaði bil á einum stað í rotary encoder driver h og svo lagði aðeins í overlay
This commit is contained in:
@@ -44,7 +44,7 @@ private:
|
|||||||
Timer_usec timer;
|
Timer_usec timer;
|
||||||
|
|
||||||
static void gpio_edge_handler(
|
static void gpio_edge_handler(
|
||||||
const structdevice *dev,
|
const struct device *dev,
|
||||||
struct gpio_callback *callback,
|
struct gpio_callback *callback,
|
||||||
uint32_t pins);
|
uint32_t pins);
|
||||||
|
|
||||||
|
|||||||
@@ -12,28 +12,46 @@
|
|||||||
motor-slp = &motor_slp;
|
motor-slp = &motor_slp;
|
||||||
};
|
};
|
||||||
|
|
||||||
encoder_c1: encoder_c1 {
|
buttons {
|
||||||
gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; /* D4, PB7 */
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
encoder_c1: encoder_c1 {
|
||||||
|
gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; /* D4, PB7 */
|
||||||
|
label = "Encoder C1";
|
||||||
|
};
|
||||||
|
|
||||||
|
encoder_c2: encoder_c2 {
|
||||||
|
gpios = <&gpiob 6 GPIO_ACTIVE_HIGH>; /* D5, PB6 */
|
||||||
|
label = "Encoder C2";
|
||||||
|
};
|
||||||
|
|
||||||
|
motor_flt: motor_flt {
|
||||||
|
gpios = <&gpioa 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* A0, PA0 */
|
||||||
|
label = "Motor fault";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
encoder_c2: encoder_c2 {
|
motor_gpio_outputs {
|
||||||
gpios = <&gpiob 6 GPIO_ACTIVE_HIGH>; /* D5, PB6 */
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
motor_bin2: motor_bin2 {
|
||||||
|
gpios = <&gpiob 1 GPIO_ACTIVE_HIGH>; /* D6, PB1 */
|
||||||
|
label = "Motor BIN2";
|
||||||
|
};
|
||||||
|
|
||||||
|
motor_slp: motor_slp {
|
||||||
|
gpios = <&gpioa 1 GPIO_ACTIVE_HIGH>; /* A1, PA1 */
|
||||||
|
label = "Motor sleep";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
motor_bin1_pwm: motor_bin1_pwm {
|
motor_pwm_outputs {
|
||||||
pwms = <&pwm1 1 PWM_USEC(50) 0>; /* D9, PA8; 20 kHz */
|
compatible = "pwm-leds";
|
||||||
};
|
|
||||||
|
|
||||||
motor_bin2: motor_bin2 {
|
motor_bin1_pwm: motor_bin1_pwm {
|
||||||
gpios = <&gpiob 1 GPIO_ACTIVE_HIGH>; /* D6, PB1 */
|
pwms = <&pwm1 1 PWM_USEC(50) 0>; /* D9, PA8; 20 kHz */
|
||||||
};
|
label = "Motor BIN1 PWM";
|
||||||
|
};
|
||||||
motor_flt: motor_flt {
|
|
||||||
gpios = <&gpioa 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* A0, PA0 */
|
|
||||||
};
|
|
||||||
|
|
||||||
motor_slp: motor_slp {
|
|
||||||
gpios = <&gpioa 1 GPIO_ACTIVE_HIGH>; /* A1, PA1 */
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user