Prusa MINI Firmware overview
diag.h
Go to the documentation of this file.
1 // diag.h
2 
3 #ifndef _DIAG_H
4 #define _DIAG_H
5 
6 #define DIAG_OK 0 // all OK
7 #define DIAG_ERR_CHECKSUM 1 // flash checksum error
8 #define DIAG_ERR_I2CEEPROM 2 // i2c eeprom st25dv64k communication error
9 #define DIAG_ERR_SPIFLASH 3 // spi flash communication error
10 #define DIAG_ERR_USBA 4 // USB host error
11 #define DIAG_ERR_TMC_X 5 // tmc2209 X-axis communication error
12 #define DIAG_ERR_TMC_Y 6 // tmc2209 Y-axis communication error
13 #define DIAG_ERR_TMC_Z 7 // tmc2209 Z-axis communication error
14 #define DIAG_ERR_TMC_E 8 // tmc2209 E-axis communication error
15 
16 #define DIAG_ERR_NOLOCK 10 // board not locked
17 #define DIAG_ERR_MACADDR 11 // MAC address not set or invalid
18 #define DIAG_ERR_BOARDREV 12 // board revision not set or invalid
19 #define DIAG_ERR_TIMESTAMP 13 // timestamp not set or invalid
20 #define DIAG_ERR_SERIAL 14 // serial not set
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif //__cplusplus
25 
26 extern int diag_fastboot;
27 
28 extern int diag_error;
29 
30 extern void diag_check_fastboot(void);
31 
32 extern void diag_test(void);
33 
34 #ifdef __cplusplus
35 }
36 #endif //__cplusplus
37 
38 #endif //_DIAG_H
diag_check_fastboot
void diag_check_fastboot(void)
Definition: diag.c:23
usb_host.h
: Header for usb_host.c file.
st25dv64k_init
void st25dv64k_init(void)
Definition: st25dv64k.c:73
diag.h
i
uint8_t i
Definition: screen_test_graph.c:72
DIAG_ERR_SPIFLASH
#define DIAG_ERR_SPIFLASH
Definition: diag.h:9
diag_fastboot
int diag_fastboot
Definition: diag.c:11
diag_delay
void diag_delay(int delay)
Definition: diag.c:17
st25dv64k_user_write
void st25dv64k_user_write(uint16_t address, uint8_t data)
Definition: st25dv64k.c:103
PC7
#define PC7
Definition: variant.h:73
diag_test
void diag_test(void)
Definition: diag.c:49
GPIO_PULLUP
#define GPIO_PULLUP
Definition: stm32f4xx_hal_gpio.h:171
gpio_get
static int gpio_get(uint8_t pin8)
Definition: gpio.h:94
diag_test
void diag_test(void)
Definition: diag.c:49
ApplicationTypeDef
ApplicationTypeDef
Definition: usb_host.h:85
APPLICATION_READY
Definition: usb_host.h:88
gpio_init
static void gpio_init(uint8_t pin8, uint32_t mode, uint32_t pull, uint32_t speed)
Definition: gpio.h:102
otp_lock_sector0
#define otp_lock_sector0
Definition: otp.h:29
GPIO_SPEED_FREQ_VERY_HIGH
#define GPIO_SPEED_FREQ_VERY_HIGH
Definition: stm32f4xx_hal_gpio.h:161
gpio.h
diag_fastboot
int diag_fastboot
Definition: diag.c:11
delay
void delay(uint32_t ms)
Definition: wiring_time.c:42
otp.h
__HAL_RCC_GPIOC_CLK_ENABLE
#define __HAL_RCC_GPIOC_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:416
Appli_state
ApplicationTypeDef Appli_state
Definition: usb_host.c:75
stm32f4xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
DIAG_ERR_USBA
#define DIAG_ERR_USBA
Definition: diag.h:10
DIAG_ERR_I2CEEPROM
#define DIAG_ERR_I2CEEPROM
Definition: diag.h:8
diag_eeprom
int diag_eeprom()
Definition: diag.c:39
diag_error
int diag_error
Definition: diag.c:13
GPIO_MODE_INPUT
#define GPIO_MODE_INPUT
Definition: stm32f4xx_hal_gpio.h:135
diag_check_fastboot
void diag_check_fastboot(void)
Definition: diag.c:23
st25dv64k_user_read
uint8_t st25dv64k_user_read(uint16_t address)
Definition: st25dv64k.c:93
st25dv64k.h
w25x.h
diag_error
int diag_error
Definition: diag.c:13
w25x_init
int8_t w25x_init(void)
Definition: w25x.c:57