Prusa MINI Firmware overview
|
#include "putslave.h"
#include <string.h>
#include "dbg.h"
#include "version.h"
#include "gpio.h"
#include "hwio_a3ides.h"
#include "sys.h"
#include "diag.h"
#include "app.h"
#include "marlin_server.h"
#include "sim_motion.h"
#include "otp.h"
#include "lwip.h"
#include "eeprom.h"
#include "cmsis_os.h"
#include "uartslave.h"
#include "hwio_pindef.h"
#include "trinamic.h"
#include "main.h"
|
int | putslave_parse_cmd_id (uartslave_t *pslave, char *pstr, uint16_t *pcmd_id) |
|
int | putslave_do_cmd_q_ver (uartslave_t *pslave) |
|
int | putslave_do_cmd_q_ser (uartslave_t *pslave) |
|
int | putslave_do_cmd_q_brev (uartslave_t *pslave) |
|
int | putslave_do_cmd_q_btim (uartslave_t *pslave) |
|
int | putslave_do_cmd_q_mac (uartslave_t *pslave) |
|
int | putslave_do_cmd_q_uid (uartslave_t *pslave) |
|
int | putslave_do_cmd_q_ip4 (uartslave_t *pslave) |
|
int | putslave_do_cmd_q_lock (uartslave_t *pslave) |
|
int | putslave_do_cmd_q_adc (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_q_gpio (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_q_pwm (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_q_tste (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_q_diag (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_q_gpup (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_q_uart (uartslave_t *pslave) |
|
int | putslave_do_cmd_q_tdg (uartslave_t *pslave) |
|
int | putslave_do_cmd_a_rst (uartslave_t *pslave) |
|
int | _validate_serial (const char *str) |
|
int | putslave_do_cmd_a_ser (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_brev (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_btim (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_mac (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_tone (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_start (uartslave_t *pslave) |
|
int | putslave_do_cmd_a_stop (uartslave_t *pslave) |
|
int | putslave_do_cmd_a_eecl (uartslave_t *pslave) |
|
int | putslave_do_cmd_a_gpio (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_gcode (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_pwm (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_lock (uartslave_t *pslave) |
|
int | putslave_do_cmd_a_tst (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_inval (uartslave_t *pslave) |
|
int | putslave_do_cmd_a_i2c (uartslave_t *pslave) |
|
int | putslave_do_cmd_a_ten (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd_a_move (uartslave_t *pslave, char *pstr) |
|
int | putslave_do_cmd (uartslave_t *pslave, uint16_t mod_msk, char cmd, uint16_t cmd_id, char *pstr) |
|
void | putslave_init (uartslave_t *pslave) |
|
◆ putslave_parse_cmd_id()
int putslave_parse_cmd_id |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr, |
|
|
uint16_t * |
pcmd_id |
|
) |
| |
30 }
else if ((pstr[3] == 0) || (pstr[3] ==
' ')) {
32 if (strncmp(pstr,
"rst", 3) == 0)
34 else if (strncmp(pstr,
"ver", 3) == 0)
36 else if (strncmp(pstr,
"ser", 3) == 0)
38 else if (strncmp(pstr,
"mac", 3) == 0)
40 else if (strncmp(pstr,
"uid", 3) == 0)
42 else if (strncmp(pstr,
"ip4", 3) == 0)
44 else if (strncmp(pstr,
"tst", 3) == 0)
46 else if (strncmp(pstr,
"adc", 3) == 0)
48 else if (strncmp(pstr,
"pwm", 3) == 0)
50 else if (strncmp(pstr,
"i2c", 3) == 0)
52 else if (strncmp(pstr,
"ten", 3) == 0)
54 else if (strncmp(pstr,
"tdg", 3) == 0)
56 }
else if ((pstr[4] == 0) || (pstr[4] ==
' ')) {
58 if (strncmp(pstr,
"brev", 4) == 0)
60 else if (strncmp(pstr,
"btim", 4) == 0)
62 else if (strncmp(pstr,
"lock", 4) == 0)
64 else if (strncmp(pstr,
"tone", 4) == 0)
66 else if (strncmp(pstr,
"gpio", 4) == 0)
68 else if (strncmp(pstr,
"stop", 4) == 0)
70 else if (strncmp(pstr,
"tste", 4) == 0)
72 else if (strncmp(pstr,
"eecl", 4) == 0)
74 else if (strncmp(pstr,
"diag", 4) == 0)
76 else if (strncmp(pstr,
"uart", 4) == 0)
78 else if (strncmp(pstr,
"move", 4) == 0)
80 else if (strncmp(pstr,
"gpup", 4) == 0)
82 }
else if ((pstr[5] == 0) || (pstr[5] ==
' ')) {
84 if (strncmp(pstr,
"gcode", 5) == 0)
86 else if (strncmp(pstr,
"start", 5) == 0)
88 else if (strncmp(pstr,
"inval", 5) == 0)
◆ putslave_do_cmd_q_ver()
◆ putslave_do_cmd_q_ser()
◆ putslave_do_cmd_q_brev()
◆ putslave_do_cmd_q_btim()
◆ putslave_do_cmd_q_mac()
124 ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);
◆ putslave_do_cmd_q_uid()
◆ putslave_do_cmd_q_ip4()
◆ putslave_do_cmd_q_lock()
◆ putslave_do_cmd_q_adc()
int putslave_do_cmd_q_adc |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
152 if (sscanf(pstr,
"%d", &adc) != 1)
154 if ((adc < 0) || (adc > 4))
◆ putslave_do_cmd_q_gpio()
int putslave_do_cmd_q_gpio |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
162 if (sscanf(pstr,
"%d", &gpio) != 1)
164 if ((gpio <
PA0) || (gpio >
PE15))
◆ putslave_do_cmd_q_pwm()
int putslave_do_cmd_q_pwm |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
172 if (sscanf(pstr,
"%d", &pwm) != 1)
174 if ((pwm < 0) || (pwm > 3))
◆ putslave_do_cmd_q_tste()
int putslave_do_cmd_q_tste |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
183 if (sscanf(pstr,
"%u", &bytes) != 1 || bytes < 16) {
◆ putslave_do_cmd_q_diag()
int putslave_do_cmd_q_diag |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
◆ putslave_do_cmd_q_gpup()
int putslave_do_cmd_q_gpup |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
203 if (sscanf(pstr,
"%d", &gpio) != 1)
205 if ((gpio <
PA0) || (gpio >
PE15))
◆ putslave_do_cmd_q_uart()
◆ putslave_do_cmd_q_tdg()
◆ putslave_do_cmd_a_rst()
◆ _validate_serial()
int _validate_serial |
( |
const char * |
str | ) |
|
243 if (sscanf(str,
"%2u%2uX%3uX%c%5u", &w2, &y2, &p3, &t1, &n5) != 5)
247 if ((y2 < 19) || (y2 > 25))
251 if ((t1 !=
'K') && (t1 !=
'C'))
◆ putslave_do_cmd_a_ser()
int putslave_do_cmd_a_ser |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
263 if (sscanf(pstr,
" CZPX%15s", ser) != 1)
265 if (strlen(ser) != 15)
◆ putslave_do_cmd_a_brev()
int putslave_do_cmd_a_brev |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
280 if (sscanf(pstr,
"%hhu.%hhu.%hhu", rev + 0, rev + 1, rev + 2) != 3)
◆ putslave_do_cmd_a_btim()
int putslave_do_cmd_a_btim |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
294 if (sscanf(pstr,
"%lu", &time_stamp) != 1)
◆ putslave_do_cmd_a_mac()
int putslave_do_cmd_a_mac |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
308 if (sscanf(pstr,
"%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
309 mac + 0, mac + 1, mac + 2, mac + 3, mac + 4, mac + 5)
311 || sscanf(pstr,
"%02hhX:%02hhX:%02hhX:%02hhX:%02hhX:%02hhX",
312 mac + 0, mac + 1, mac + 2, mac + 3, mac + 4, mac + 5)
◆ putslave_do_cmd_a_tone()
int putslave_do_cmd_a_tone |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
325 unsigned int del = 0;
327 int s = sscanf(pstr,
"%f %u %f", &frq, &del, &vol);
◆ putslave_do_cmd_a_start()
347 NVIC_EnableIRQ(TIM7_IRQn);
◆ putslave_do_cmd_a_stop()
370 NVIC_DisableIRQ(TIM7_IRQn);
◆ putslave_do_cmd_a_eecl()
◆ putslave_do_cmd_a_gpio()
int putslave_do_cmd_a_gpio |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
392 if (sscanf(pstr,
"%d%n", &gpio, &n) != 1)
394 if ((gpio <
PA0) || (gpio >
PE15))
397 if (sscanf(pstr,
"%d%n", &
state, &n) != 1)
◆ putslave_do_cmd_a_gcode()
int putslave_do_cmd_a_gcode |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
414 if (sscanf(pstr + 1,
"%31[^\n]%n",
gcode, &n) != 1)
◆ putslave_do_cmd_a_pwm()
int putslave_do_cmd_a_pwm |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
424 if (sscanf(pstr,
"%d%n", &pwm, &n) != 1)
426 if ((pwm < 0) || (pwm > 3))
429 if (sscanf(pstr,
"%d%n", &value, &n) != 1)
◆ putslave_do_cmd_a_lock()
◆ putslave_do_cmd_a_tst()
int putslave_do_cmd_a_tst |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
448 int run_selftest = 0;
449 int run_xyzcalib = 0;
450 int run_firstlay = 0;
452 if (sscanf(pstr,
"%d %d %d", &run_selftest, &run_xyzcalib, &run_firstlay) <= 0)
◆ putslave_do_cmd_a_inval()
◆ putslave_do_cmd_a_i2c()
486 uint8_t _out[3] = { 0 >> 8, 0 & 0xff, 0x56 };
◆ putslave_do_cmd_a_ten()
int putslave_do_cmd_a_ten |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
495 if (sscanf(pstr,
"%d", &
state) != 1)
◆ putslave_do_cmd_a_move()
int putslave_do_cmd_a_move |
( |
uartslave_t * |
pslave, |
|
|
char * |
pstr |
|
) |
| |
514 if (sscanf(pstr,
"%d%n", &
stepper, &n) != 1)
519 if (sscanf(pstr,
"%d%n", &steps, &n) != 1)
521 if ((steps < 0) || (steps > 10000))
524 if (sscanf(pstr,
"%d%n", &dir, &n) != 1)
526 if ((dir < 0) || (dir > 10))
529 if (sscanf(pstr,
"%d%n", &speed, &n) != 1)
531 if ((speed < 0) || (speed > 10))
◆ putslave_do_cmd()
int putslave_do_cmd |
( |
uartslave_t * |
pslave, |
|
|
uint16_t |
mod_msk, |
|
|
char |
cmd, |
|
|
uint16_t |
cmd_id, |
|
|
char * |
pstr |
|
) |
| |
575 }
else if (cmd ==
'!') {
◆ putslave_init()
627 NVIC_DisableIRQ(TIM7_IRQn);
◆ defaultTaskHandle
◆ displayTaskHandle
◆ idleTaskHandle
◆ webServerTaskHandle
◆ hspi2
◆ put_setup_done
◆ hi2c1
#define PUTSLAVE_CMD_ID_MOVE
Definition: putslave.h:31
int putslave_do_cmd_a_brev(uartslave_t *pslave, char *pstr)
Definition: putslave.c:276
int putslave_do_cmd_a_tst(uartslave_t *pslave, char *pstr)
Definition: putslave.c:447
int putslave_do_cmd_q_ver(uartslave_t *pslave)
Definition: putslave.c:98
#define UARTSLAVE_ERR_OOR
Definition: uartslave.h:18
#define OTP_MAC_ADDRESS_ADDR
Definition: otp.h:18
#define PUTSLAVE_CMD_ID_GCODE
Definition: putslave.h:24
int putslave_do_cmd_a_gcode(uartslave_t *pslave, char *pstr)
Definition: putslave.c:411
int putslave_do_cmd_a_rst(uartslave_t *pslave)
Definition: putslave.c:232
int putslave_do_cmd_q_uart(uartslave_t *pslave)
Definition: putslave.c:212
int8_t eeprom_test_PUT(const unsigned int bytes)
Definition: eeprom.c:208
void hwio_beeper_set_pwm(uint32_t per, uint32_t pul)
Definition: hwio_a3ides_2209_02.c:491
#define GPIO_MODE_OUTPUT_PP
Definition: stm32f4xx_hal_gpio.h:136
int putslave_do_cmd_q_mac(uartslave_t *pslave)
Definition: putslave.c:121
#define PUTSLAVE_CMD_ID_STOP
Definition: putslave.h:19
variant8_t variant8_ui8(uint8_t ui8)
Definition: variant8.c:18
int uartslave_printf(uartslave_t *pslave, const char *fmt,...)
Definition: uartslave.c:129
#define UARTSLAVE_ERR_SYN
Definition: uartslave.h:17
#define GPIO_SPEED_FREQ_HIGH
Definition: stm32f4xx_hal_gpio.h:160
static uint8_t uart1rx_data[200]
Definition: main.c:145
#define PUTSLAVE_CMD_ID_TSTE
Definition: putslave.h:20
#define PUTSLAVE_CMD_ID_MAC
Definition: putslave.h:12
void sys_reset(void)
Definition: sys.cpp:20
void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi)
SPI MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:252
int putslave_do_cmd_a_inval(uartslave_t *pslave)
Definition: putslave.c:463
#define PUTSLAVE_CMD_ID_ADC
Definition: putslave.h:22
#define PC3
Definition: variant.h:94
list gcode
Definition: g29_auto.py:44
#define PUTSLAVE_CMD_ID_INVAL
Definition: putslave.h:26
#define PUTSLAVE_CMD_ID_RST
Definition: putslave.h:7
#define PD3
Definition: variant.h:58
void hwio_beeper_set_vol(float vol)
Definition: hwio_a3ides_2209_02.c:483
void tmc_set_move(uint8_t tmc, uint32_t step, uint8_t dir, uint8_t speed)
Stepper stepper
Definition: stepper.cpp:82
int marlin_server_enqueue_gcode(const char *gcode)
Definition: marlin_server.cpp:318
uint8_t flags
Definition: uartslave.h:34
void hwio_pwm_set_val(int i_pwm, int val)
Definition: hwio_a3ides_2209_02.c:376
#define PD10
Definition: variant.h:80
osStatus osThreadResume(osThreadId thread_id)
Resume execution of a suspended thread.
Definition: cmsis_os.c:1494
void marlin_server_stop_processing(void)
Definition: marlin_server.cpp:293
int sys_fw_validate(void)
Definition: sys.cpp:281
int _validate_serial(const char *str)
Definition: putslave.c:237
#define EEVAR_RUN_FIRSTLAY
Definition: eeprom.h:16
#define PUTSLAVE_CMD_ID_TST
Definition: putslave.h:16
int hwio_adc_get_val(int i_adc)
Definition: hwio_a3ides_2209_02.c:245
static volatile fsensor_t state
Definition: filament_sensor.c:23
int putslave_do_cmd_q_pwm(uartslave_t *pslave, char *pstr)
Definition: putslave.c:170
const char version_firmware_name[]
Definition: version.c:24
int putslave_do_cmd_q_btim(uartslave_t *pslave)
Definition: putslave.c:115
void eeprom_set_var(uint8_t id, variant8_t var)
Definition: eeprom.c:88
#define PUTSLAVE_CMD_ID_GPIO
Definition: putslave.h:23
void eeprom_clear(void)
Definition: eeprom.c:201
int putslave_do_cmd_a_mac(uartslave_t *pslave, char *pstr)
Definition: putslave.c:304
#define OTP_SERIAL_NUMBER_ADDR
Definition: otp.h:14
int diag_fastboot
Definition: diag.c:11
int putslave_do_cmd_a_start(uartslave_t *pslave)
Definition: putslave.c:345
#define PUTSLAVE_CMD_ID_SER
Definition: putslave.h:9
int putslave_do_cmd_a_pwm(uartslave_t *pslave, char *pstr)
Definition: putslave.c:420
#define OTP_MAC_ADDRESS_SIZE
Definition: otp.h:19
int putslave_do_cmd_a_ten(uartslave_t *pslave, char *pstr)
Definition: putslave.c:493
int putslave_do_cmd_a_eecl(uartslave_t *pslave)
Definition: putslave.c:383
int putslave_do_cmd_q_brev(uartslave_t *pslave)
Definition: putslave.c:109
void app_setup(void)
Definition: appmain.cpp:51
UART_HandleTypeDef * phuart
Definition: uartrxbuff.h:17
int putslave_do_cmd_a_gpio(uartslave_t *pslave, char *pstr)
Definition: putslave.c:388
#define UARTSLAVE_CMD_ID_UNK
Definition: uartslave.h:12
void diag_test(void)
Definition: diag.c:49
#define GPIO_PULLUP
Definition: stm32f4xx_hal_gpio.h:171
void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi)
SPI MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:337
static int gpio_get(uint8_t pin8)
Definition: gpio.h:94
#define UARTSLAVE_FLG_ECHO
Definition: uartslave.h:7
int putslave_do_cmd_q_ip4(uartslave_t *pslave)
Definition: putslave.c:134
#define _PWM_HEATER_0
Definition: hwio_a3ides.h:41
int sys_flash_write(void *dst, void *src, int size)
Definition: sys.cpp:293
#define UARTSLAVE_ERR_ONP
Definition: uartslave.h:19
int putslave_do_cmd_q_ser(uartslave_t *pslave)
Definition: putslave.c:103
#define PUTSLAVE_CMD_ID_TDG
Definition: putslave.h:32
int putslave_do_cmd_q_lock(uartslave_t *pslave)
Definition: putslave.c:144
#define EEVAR_RUN_XYZCALIB
Definition: eeprom.h:15
void hwio_beeper_tone(float frq, uint32_t del)
Definition: hwio_a3ides_2209_02.c:514
#define UARTSLAVE_ERR_CNF
Definition: uartslave.h:21
#define EEVAR_RUN_SELFTEST
Definition: eeprom.h:14
static void gpio_init(uint8_t pin8, uint32_t mode, uint32_t pull, uint32_t speed)
Definition: gpio.h:102
int putslave_do_cmd_a_i2c(uartslave_t *pslave)
Definition: putslave.c:484
#define PUTSLAVE_CMD_ID_TEN
Definition: putslave.h:30
int sys_fw_is_valid(void)
Definition: sys.cpp:266
#define PUTSLAVE_CMD_ID_START
Definition: putslave.h:18
int putslave_do_cmd_a_stop(uartslave_t *pslave)
Definition: putslave.c:362
#define OTP_BOARD_TIME_STAMP_SIZE
Definition: otp.h:11
int hwio_pwm_get_max(int i_pwm)
Definition: hwio_a3ides_2209_02.c:276
int putslave_do_cmd_q_gpup(uartslave_t *pslave, char *pstr)
Definition: putslave.c:201
int putslave_do_cmd_q_uid(uartslave_t *pslave)
Definition: putslave.c:128
#define PUTSLAVE_CMD_ID_EECL
Definition: putslave.h:21
int putslave_do_cmd_a_btim(uartslave_t *pslave, char *pstr)
Definition: putslave.c:290
#define GPIO_NOPULL
Definition: stm32f4xx_hal_gpio.h:170
osStatus osThreadSuspend(osThreadId thread_id)
Suspend execution of a thread.
Definition: cmsis_os.c:1478
struct netif * netif_default
Definition: netif.c:105
#define GPIO_SPEED_FREQ_VERY_HIGH
Definition: stm32f4xx_hal_gpio.h:161
#define _PWM_HEATER_BED
Definition: hwio_a3ides.h:40
#define PUTSLAVE_CMD_ID_BTIM
Definition: putslave.h:11
uartrxbuff_t uart1rxbuff
Definition: main.c:144
int putslave_do_cmd_q_adc(uartslave_t *pslave, char *pstr)
Definition: putslave.c:150
#define OTP_LOCK_BLOCK_ADDR
Definition: otp.h:22
int sys_flash_is_empty(void *ptr, int size)
Definition: sys.cpp:285
const uint8_t[]
Definition: 404_html.c:3
int sys_fw_invalidate(void)
Definition: sys.cpp:271
int putslave_do_cmd_q_diag(uartslave_t *pslave, char *pstr)
Definition: putslave.c:194
SPI_HandleTypeDef hspi2
Definition: main.c:81
HAL_StatusTypeDef HAL_I2C_Master_Transmit(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout)
int putslave_do_cmd_a_ser(uartslave_t *pslave, char *pstr)
Definition: putslave.c:258
#define PUTSLAVE_CMD_ID_UART
Definition: putslave.h:28
int putslave_do_cmd_a_lock(uartslave_t *pslave)
Definition: putslave.c:437
int putslave_do_cmd_q_gpio(uartslave_t *pslave, char *pstr)
Definition: putslave.c:160
I2C_HandleTypeDef hi2c1
Definition: main.c:77
#define PUTSLAVE_CMD_ID_PWM
Definition: putslave.h:25
#define OTP_BOARD_REVISION_SIZE
Definition: otp.h:7
#define OTP_STM32_UUID_ADDR
Definition: otp.h:26
#define PUTSLAVE_CMD_ID_BREV
Definition: putslave.h:10
#define OTP_BOARD_TIME_STAMP_ADDR
Definition: otp.h:10
#define PA0
Definition: variant.h:95
uartslave_do_cmd_t * do_cmd
Definition: uartslave.h:40
#define PB10
Definition: variant.h:116
#define UARTSLAVE_ERR_UNK
Definition: uartslave.h:15
int putslave_do_cmd(uartslave_t *pslave, uint16_t mod_msk, char cmd, uint16_t cmd_id, char *pstr)
Definition: putslave.c:538
#define UARTSLAVE_OK
Definition: uartslave.h:14
static void gpio_set(uint8_t pin8, int state)
Definition: gpio.h:98
int put_setup_done
Definition: putslave.c:343
#define PUTSLAVE_CMD_ID_GPUP
Definition: putslave.h:33
int putslave_do_cmd_q_tste(uartslave_t *pslave, char *pstr)
Definition: putslave.c:179
#define PD14
Definition: variant.h:76
void marlin_server_start_processing(void)
Definition: marlin_server.cpp:288
const char version_version[]
semantic version (https://semver.org) is Prusa3D standard
Definition: version.c:31
int putslave_do_cmd_a_move(uartslave_t *pslave, char *pstr)
Definition: putslave.c:507
int diag_error
Definition: diag.c:13
#define PC2
Definition: variant.h:93
#define OTP_BOARD_REVISION_ADDR
Definition: otp.h:6
#define HAL_MAX_DELAY
Definition: stm32f4xx_hal_def.h:76
#define PUTSLAVE_CMD_ID_UID
Definition: putslave.h:13
#define GPIO_MODE_INPUT
Definition: stm32f4xx_hal_gpio.h:135
#define PD2
Definition: variant.h:59
#define UARTSLAVE_CMD_ID_0
Definition: uartslave.h:11
#define OTP_SERIAL_NUMBER_SIZE
Definition: otp.h:15
osThreadId webServerTaskHandle
Definition: main.c:100
#define PUTSLAVE_CMD_ID_I2C
Definition: putslave.h:29
#define PUTSLAVE_CMD_ID_LOCK
Definition: putslave.h:15
int putslave_do_cmd_q_tdg(uartslave_t *pslave)
Definition: putslave.c:222
void tmc_set_sgthrs(uint8_t SGT)
osThreadId displayTaskHandle
Definition: main.c:98
uartslave_parse_cmd_id_t * parse_cmd_id
Definition: uartslave.h:39
#define PUTSLAVE_CMD_ID_VER
Definition: putslave.h:8
int putslave_do_cmd_a_tone(uartslave_t *pslave, char *pstr)
Definition: putslave.c:323
#define PUTSLAVE_CMD_ID_TONE
Definition: putslave.h:17
#define PUTSLAVE_CMD_ID_IP4
Definition: putslave.h:14
int putslave_parse_cmd_id(uartslave_t *pslave, char *pstr, uint16_t *pcmd_id)
Definition: putslave.c:24
#define PUTSLAVE_CMD_ID_DIAG
Definition: putslave.h:27
#define PE15
Definition: variant.h:115
HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
int marlin_server_processing(void)
Definition: marlin_server.cpp:284