Prusa MINI Firmware overview
|
Go to the source code of this file.
◆ UARTSLAVE_FLG_ECHO
#define UARTSLAVE_FLG_ECHO 0x01 |
◆ UARTSLAVE_MOD_MSK_0
#define UARTSLAVE_MOD_MSK_0 0x0000 |
◆ UARTSLAVE_CMD_ID_0
#define UARTSLAVE_CMD_ID_0 0x0000 |
◆ UARTSLAVE_CMD_ID_UNK
#define UARTSLAVE_CMD_ID_UNK 0xffff |
◆ UARTSLAVE_OK
◆ UARTSLAVE_ERR_UNK
#define UARTSLAVE_ERR_UNK -1 |
◆ UARTSLAVE_ERR_BSY
#define UARTSLAVE_ERR_BSY -2 |
◆ UARTSLAVE_ERR_SYN
#define UARTSLAVE_ERR_SYN -3 |
◆ UARTSLAVE_ERR_OOR
#define UARTSLAVE_ERR_OOR -4 |
◆ UARTSLAVE_ERR_ONP
#define UARTSLAVE_ERR_ONP -5 |
◆ UARTSLAVE_ERR_NUL
#define UARTSLAVE_ERR_NUL -6 |
◆ UARTSLAVE_ERR_CNF
#define UARTSLAVE_ERR_CNF -7 |
◆ uartslave_t
◆ uartslave_parse_mod_mask_t
typedef int() uartslave_parse_mod_mask_t(uartslave_t *pslave, char *pstr, uint16_t *pmod_msk) |
◆ uartslave_parse_cmd_id_t
typedef int() uartslave_parse_cmd_id_t(uartslave_t *pslave, char *pstr, uint16_t *pcmd_id) |
◆ uartslave_do_cmd_t
typedef int() uartslave_do_cmd_t(uartslave_t *pslave, uint16_t mod_msk, char cmd, uint16_t pcmd_id, char *pstr) |
◆ uartslave_init()
62 pslave->
pline = pline;
◆ uartslave_cycle()
83 if ((ch == 0) || (pslave->
count >= pslave->
size))
88 _dbg0(
"ERROR: command overflow\n");
90 }
else if ((pslave->
count > 0) && (ch == 0)) {
114 ret = pslave->
do_cmd(pslave, mod_msk, ch, cmd_id, pstr);
◆ uartslave_printf()
133 int len = vsprintf(text, fmt, va);
uartslave_parse_mod_mask_t * parse_mod_mask
Definition: uartslave.h:38
int count
Definition: uartslave.h:35
#define UARTSLAVE_ERR_SYN
Definition: uartslave.h:17
int uartslave_printf(uartslave_t *pslave, const char *fmt,...)
Definition: uartslave.c:129
Definition: stm32f4xx_hal_def.h:57
#define _dbg0
Definition: dbg.h:31
uint8_t flags
Definition: uartslave.h:34
int uartslave_do_cmd(uartslave_t *pslave, uint16_t mod_msk, char cmd, uint16_t cmd_id, char *pstr)
Definition: uartslave.c:52
UART_HandleTypeDef * phuart
Definition: uartrxbuff.h:17
int size
Definition: uartslave.h:36
int uartrxbuff_getchar(uartrxbuff_t *prxbuff)
Definition: uartrxbuff.c:38
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32f4xx_hal_def.h:55
uartrxbuff_t * prxbuff
Definition: uartslave.h:33
#define UARTSLAVE_FLG_ECHO
Definition: uartslave.h:7
const uint8_t[]
Definition: 404_html.c:3
char * pline
Definition: uartslave.h:37
uartslave_do_cmd_t * do_cmd
Definition: uartslave.h:40
int uartslave_parse_mod_mask(uartslave_t *pslave, char *pstr, uint16_t *pmod_msk)
Definition: uartslave.c:10
#define UARTSLAVE_OK
Definition: uartslave.h:14
int uartslave_parse_cmd_id(uartslave_t *pslave, char *pstr, uint16_t *pcmd_id)
Definition: uartslave.c:34
#define HAL_MAX_DELAY
Definition: stm32f4xx_hal_def.h:76
uartslave_parse_cmd_id_t * parse_cmd_id
Definition: uartslave.h:39
static png_bytep size_t size
Definition: pngwrite.c:2170
HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)