Prusa MINI Firmware overview
|
#include "jogwheel.h"
#include <limits.h>
#include "gpio.h"
◆ jogwheel_init()
◆ jogwheel_update_1ms()
45 if (((signals & 3) == 0) || ((signals & 3) == 3)) {
46 if (((change & 3) == 1) && ((change2 & 3) == 2))
48 if (((change & 3) == 2) && ((change2 & 3) == 1))
52 if ((change & 1) && (signals & 1) && !(signals & 2))
54 if ((change & 2) && (signals & 2) && !(signals & 1))
◆ jogwheel_encoder_set()
void jogwheel_encoder_set |
( |
int32_t |
val, |
|
|
int32_t |
min, |
|
|
int32_t |
max |
|
) |
| |
◆ jogwheel_signals
◆ jogwheel_signals_old
◆ jogwheel_signals_new
◆ jogwheel_encoder
int32_t jogwheel_encoder = 0 |
◆ jogwheel_encoder_min
int32_t jogwheel_encoder_min = INT_MIN |
◆ jogwheel_encoder_max
int32_t jogwheel_encoder_max = INT_MAX |
◆ jogwheel_button_down
uint16_t jogwheel_button_down = 0 |
◆ jogwheel_changed
◆ jogwheel_config
uint8_t pinEN2
Definition: jogwheel.h:22
#define JOGWHEEL_FLG_2PULSES
Definition: jogwheel.h:11
uint16_t jogwheel_button_down
Definition: jogwheel.c:13
int32_t jogwheel_encoder
Definition: jogwheel.c:10
#define max(a, b)
Definition: wiring_constants.h:40
uint8_t jogwheel_signals_old
Definition: jogwheel.c:8
uint8_t jogwheel_signals
Definition: jogwheel.c:7
#define GPIO_PULLUP
Definition: stm32f4xx_hal_gpio.h:171
static int gpio_get(uint8_t pin8)
Definition: gpio.h:94
#define JOGWHEEL_FLG_INV_ENC
Definition: jogwheel.h:9
#define min(a, b)
Definition: wiring_constants.h:36
static void gpio_init(uint8_t pin8, uint32_t mode, uint32_t pull, uint32_t speed)
Definition: gpio.h:102
uint8_t jogwheel_changed
Definition: jogwheel.c:14
uint8_t flg
Definition: jogwheel.h:24
#define JOGWHEEL_FLG_INV_DIR
Definition: jogwheel.h:8
#define JOGWHEEL_FLG_INV_E12
Definition: jogwheel.h:10
const uint8_t[]
Definition: 404_html.c:3
int32_t jogwheel_encoder_min
Definition: jogwheel.c:11
int32_t jogwheel_encoder_max
Definition: jogwheel.c:12
#define GPIO_MODE_INPUT
Definition: stm32f4xx_hal_gpio.h:135
uint8_t pinEN1
Definition: jogwheel.h:21
uint8_t jogwheel_signals_new
Definition: jogwheel.c:9
uint8_t pinENC
Definition: jogwheel.h:23
#define GPIO_SPEED_FREQ_LOW
Definition: stm32f4xx_hal_gpio.h:158
jogwheel_config_t jogwheel_config
Definition: jogwheel.c:95