Prusa MINI Firmware overview
|
Go to the documentation of this file.
7 #define UARTSLAVE_FLG_ECHO 0x01
9 #define UARTSLAVE_MOD_MSK_0 0x0000
11 #define UARTSLAVE_CMD_ID_0 0x0000
12 #define UARTSLAVE_CMD_ID_UNK 0xffff
14 #define UARTSLAVE_OK 0 //ok - success
15 #define UARTSLAVE_ERR_UNK -1 //error 1 - unknown/unspecified failure
16 #define UARTSLAVE_ERR_BSY -2 //error 2 - busy
17 #define UARTSLAVE_ERR_SYN -3 //error 3 - syntax error
18 #define UARTSLAVE_ERR_OOR -4 //error 4 - parameter out of range
19 #define UARTSLAVE_ERR_ONP -5 //error 5 - operation not permitted
20 #define UARTSLAVE_ERR_NUL -6 //error 6 - null pointer
21 #define UARTSLAVE_ERR_CNF -7 //error 7 - command not found
59 #endif // _UARTSLAVE_H
uartslave_parse_mod_mask_t * parse_mod_mask
Definition: uartslave.h:38
int() uartslave_parse_cmd_id_t(uartslave_t *pslave, char *pstr, uint16_t *pcmd_id)
Definition: uartslave.h:26
int count
Definition: uartslave.h:35
int uartslave_printf(uartslave_t *pslave, const char *fmt,...)
Definition: uartslave.c:129
#define UARTSLAVE_ERR_SYN
Definition: uartslave.h:17
Definition: stm32f4xx_hal_def.h:57
void uartslave_cycle(uartslave_t *pslave)
Definition: uartslave.c:68
int() uartslave_parse_mod_mask_t(uartslave_t *pslave, char *pstr, uint16_t *pmod_msk)
Definition: uartslave.h:25
Definition: uartslave.h:32
#define _dbg0
Definition: dbg.h:31
void uartslave_cycle(uartslave_t *pslave)
Definition: uartslave.c:68
uint8_t flags
Definition: uartslave.h:34
#define UARTSLAVE_MOD_MSK_0
Definition: uartslave.h:9
int uartslave_printf(uartslave_t *pslave, const char *fmt,...)
Definition: uartslave.c:129
int uartslave_do_cmd(uartslave_t *pslave, uint16_t mod_msk, char cmd, uint16_t cmd_id, char *pstr)
Definition: uartslave.c:52
void uartslave_init(uartslave_t *pslave, uartrxbuff_t *prxbuff, int size, char *pline)
Definition: uartslave.c:57
UART_HandleTypeDef * phuart
Definition: uartrxbuff.h:17
#define UARTSLAVE_CMD_ID_UNK
Definition: uartslave.h:12
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
int() uartslave_do_cmd_t(uartslave_t *pslave, uint16_t mod_msk, char cmd, uint16_t pcmd_id, char *pstr)
Definition: uartslave.h:27
This file contains all the functions prototypes for the HAL module driver.
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
Definition: createSpeedLookupTable.py:15
struct _uartslave_t uartslave_t
Definition: uartslave.h:23
int uartslave_parse_cmd_id(uartslave_t *pslave, char *pstr, uint16_t *pcmd_id)
Definition: uartslave.c:34
void uartslave_init(uartslave_t *pslave, uartrxbuff_t *prxbuff, int size, char *pline)
Definition: uartslave.c:57
#define HAL_MAX_DELAY
Definition: stm32f4xx_hal_def.h:76
#define UARTSLAVE_CMD_ID_0
Definition: uartslave.h:11
uartslave_parse_cmd_id_t * parse_cmd_id
Definition: uartslave.h:39
Definition: uartrxbuff.h:16
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)