Prusa MINI Firmware overview
sys.h
Go to the documentation of this file.
1 // sys.h - system functions
2 #include "stdint.h"
3 #include "shared_config.h"
4 
5 #ifndef _SYS_H
6 #define _SYS_H
7 
8 
9 #ifdef __cplusplus
10 
11 extern version_t &boot_version; // (address) from flash -> "volatile" is not necessary
12 
13 extern "C" {
14 #endif //__cplusplus
15 
16 extern volatile data_exchange_t ram_data_exchange;
17 
18 
19 extern void sys_reset(void);
20 
21 extern void sys_dfu_boot(void);
22 
23 extern int sys_pll_is_enabled(void);
24 
25 extern void sys_pll_disable(void);
26 
27 extern void sys_pll_enable(void);
28 
29 extern int sys_sscg_is_enabled(void);
30 
31 extern void sys_sscg_disable(void);
32 
33 extern void sys_sscg_enable(void);
34 
35 extern void sys_sscg_set_config(int freq, int depth);
36 
37 extern int sys_sscg_get_config(float *pfreq, float *pdepth);
38 
39 extern void sys_spi_set_prescaler(int prescaler_num);
40 
41 extern int sys_fw_update_is_enabled(void);
42 
43 extern void sys_fw_update_enable(void);
44 
45 extern void sys_fw_update_disable(void);
46 
48 
49 extern void sys_fw_update_on_restart_enable(void);
50 
51 extern void sys_fw_update_on_restart_disable(void);
52 
53 extern int sys_fw_is_valid(void);
54 
55 extern int sys_fw_invalidate(void);
56 
57 extern int sys_fw_validate(void);
58 
59 extern int sys_flash_is_empty(void *ptr, int size);
60 
61 extern int sys_flash_write(void *dst, void *src, int size);
62 
63 extern int sys_flash_erase_sector(unsigned int sector);
64 
65 #ifdef __cplusplus
66 }
67 #endif //__cplusplus
68 
69 #endif // _SYS_H
sys_flash_is_empty
int sys_flash_is_empty(void *ptr, int size)
Definition: sys.cpp:285
sys_sscg_set_config
void sys_sscg_set_config(int freq, int depth)
Definition: sys.cpp:159
sys_flash_write
int sys_flash_write(void *dst, void *src, int size)
Definition: sys.cpp:293
sys_fw_is_valid
int sys_fw_is_valid(void)
Definition: sys.cpp:266
sys_fw_update_is_enabled
int sys_fw_update_is_enabled(void)
Definition: sys.cpp:241
ram_data_exchange
volatile data_exchange_t ram_data_exchange
sys_reset
void sys_reset(void)
Definition: sys.cpp:20
sys_fw_validate
int sys_fw_validate(void)
Definition: sys.cpp:281
sys_pll_disable
void sys_pll_disable(void)
Definition: sys.cpp:57
sys_pll_is_enabled
int sys_pll_is_enabled(void)
Definition: sys.cpp:48
sys_fw_update_disable
void sys_fw_update_disable(void)
Definition: sys.cpp:249
sys_spi_set_prescaler
void sys_spi_set_prescaler(int prescaler_num)
Definition: sys.cpp:230
sys_fw_update_on_restart_enable
void sys_fw_update_on_restart_enable(void)
Definition: sys.cpp:257
sys_sscg_enable
void sys_sscg_enable(void)
Definition: sys.cpp:140
sys_sscg_is_enabled
int sys_sscg_is_enabled(void)
Definition: sys.cpp:121
sys_fw_update_on_restart_disable
void sys_fw_update_on_restart_disable(void)
Definition: sys.cpp:261
sys_dfu_boot
void sys_dfu_boot(void)
Definition: sys.cpp:31
sys_sscg_disable
void sys_sscg_disable(void)
Definition: sys.cpp:125
sys_sscg_get_config
int sys_sscg_get_config(float *pfreq, float *pdepth)
Definition: sys.cpp:204
sys_flash_erase_sector
int sys_flash_erase_sector(unsigned int sector)
Definition: sys.cpp:323
shared_config.h
sys_pll_enable
void sys_pll_enable(void)
Definition: sys.cpp:78
boot_version
version_t & boot_version
Definition: sys.cpp:16
sys_fw_invalidate
int sys_fw_invalidate(void)
Definition: sys.cpp:271
version_t
Definition: shared_config.h:38
data_exchange_t
Definition: shared_config.h:19
sys_fw_update_enable
void sys_fw_update_enable(void)
Definition: sys.cpp:245
sys_fw_update_on_restart_is_enabled
int sys_fw_update_on_restart_is_enabled(void)
Definition: sys.cpp:253
size
static png_bytep size_t size
Definition: pngwrite.c:2170