Prusa MINI Firmware overview
|
Go to the documentation of this file.
2 #ifndef _MARLIN_EVENTS_H
3 #define _MARLIN_EVENTS_H
8 #define MARLIN_EVT_Startup 0x00 // onStartup()
9 #define MARLIN_EVT_Idle 0x01 // onIdle()
10 #define MARLIN_EVT_PrinterKilled 0x02 // onPrinterKilled(PGM_P const msg)
11 #define MARLIN_EVT_MediaInserted 0x03 // onMediaInserted();
12 #define MARLIN_EVT_MediaError 0x04 // onMediaError();
13 #define MARLIN_EVT_MediaRemoved 0x05 // onMediaRemoved();
14 #define MARLIN_EVT_PlayTone 0x06 // onPlayTone(const uint16_t frequency, const uint16_t duration)
15 #define MARLIN_EVT_PrintTimerStarted 0x07 // onPrintTimerStarted()
16 #define MARLIN_EVT_PrintTimerPaused 0x08 // onPrintTimerPaused()
17 #define MARLIN_EVT_PrintTimerStopped 0x09 // onPrintTimerStopped()
18 #define MARLIN_EVT_FilamentRunout 0x0a // onFilamentRunout()
19 #define MARLIN_EVT_UserConfirmRequired 0x0b // onUserConfirmRequired(const char * const msg)
20 #define MARLIN_EVT_StatusChanged 0x0c // onStatusChanged(const char * const msg)
21 #define MARLIN_EVT_FactoryReset 0x0d // onFactoryReset()
22 #define MARLIN_EVT_LoadSettings 0x0e // onLoadSettings()
23 #define MARLIN_EVT_StoreSettings 0x0f // onStoreSettings()
24 #define MARLIN_EVT_MeshUpdate 0x10 // onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval)
26 #define MARLIN_EVT_HostPrompt 0x11 // host_action_prompt
28 #define MARLIN_EVT_StartProcessing 0x12 // sent from marlin_server_start_processing
29 #define MARLIN_EVT_StopProcessing 0x13 // sent from marlin_server_stop_processing
30 #define MARLIN_EVT_Busy 0x14 // sent from marlin_server_idle
31 #define MARLIN_EVT_Ready 0x15 // sent from marlin_server_loop
32 #define MARLIN_EVT_Error 0x16 // sent onStatusChanged etc.
33 #define MARLIN_EVT_CommandBegin 0x17 //
34 #define MARLIN_EVT_CommandEnd 0x18 //
35 #define MARLIN_EVT_SafetyTimerExpired 0x19 // host action from marlin, hotends and bed turned off
36 #define MARLIN_EVT_Message 0x1a //
37 #define MARLIN_EVT_Reheat 0x1b //
38 #define MARLIN_EVT_Acknowledge 0x1c // onAcknowledge - lowest priority
39 #define MARLIN_EVT_MAX MARLIN_EVT_Acknowledge
42 #define MARLIN_EVT_MSK(e_id) ((uint64_t)1 << (e_id))
43 #define MARLIN_EVT_MSK_DEF ( \
44 MARLIN_EVT_MSK(MARLIN_EVT_Startup) | MARLIN_EVT_MSK(MARLIN_EVT_MediaInserted) | MARLIN_EVT_MSK(MARLIN_EVT_MediaError) | MARLIN_EVT_MSK(MARLIN_EVT_MediaRemoved) | MARLIN_EVT_MSK(MARLIN_EVT_PlayTone) | MARLIN_EVT_MSK(MARLIN_EVT_PrintTimerStarted) | MARLIN_EVT_MSK(MARLIN_EVT_PrintTimerPaused) | MARLIN_EVT_MSK(MARLIN_EVT_PrintTimerStopped) | MARLIN_EVT_MSK(MARLIN_EVT_FilamentRunout) | MARLIN_EVT_MSK(MARLIN_EVT_UserConfirmRequired) | MARLIN_EVT_MSK(MARLIN_EVT_StatusChanged) | MARLIN_EVT_MSK(MARLIN_EVT_FactoryReset) | MARLIN_EVT_MSK(MARLIN_EVT_LoadSettings) | MARLIN_EVT_MSK(MARLIN_EVT_StoreSettings) | MARLIN_EVT_MSK(MARLIN_EVT_MeshUpdate) | MARLIN_EVT_MSK(MARLIN_EVT_HostPrompt) | MARLIN_EVT_MSK(MARLIN_EVT_StartProcessing) | MARLIN_EVT_MSK(MARLIN_EVT_StopProcessing) | MARLIN_EVT_MSK(MARLIN_EVT_Busy) | MARLIN_EVT_MSK(MARLIN_EVT_Ready) | MARLIN_EVT_MSK(MARLIN_EVT_Error) | MARLIN_EVT_MSK(MARLIN_EVT_CommandBegin) | MARLIN_EVT_MSK(MARLIN_EVT_CommandEnd) | MARLIN_EVT_MSK(MARLIN_EVT_SafetyTimerExpired) | MARLIN_EVT_MSK(MARLIN_EVT_Message) | MARLIN_EVT_MSK(MARLIN_EVT_Reheat) | MARLIN_EVT_MSK(MARLIN_EVT_Acknowledge))
46 #define MARLIN_EVT_MSK_ALL ( \
47 MARLIN_EVT_MSK(MARLIN_EVT_Startup) | MARLIN_EVT_MSK(MARLIN_EVT_Idle) | MARLIN_EVT_MSK(MARLIN_EVT_PrinterKilled) | MARLIN_EVT_MSK(MARLIN_EVT_MediaInserted) | MARLIN_EVT_MSK(MARLIN_EVT_MediaError) | MARLIN_EVT_MSK(MARLIN_EVT_MediaRemoved) | MARLIN_EVT_MSK(MARLIN_EVT_PlayTone) | MARLIN_EVT_MSK(MARLIN_EVT_PrintTimerStarted) | MARLIN_EVT_MSK(MARLIN_EVT_PrintTimerPaused) | MARLIN_EVT_MSK(MARLIN_EVT_PrintTimerStopped) | MARLIN_EVT_MSK(MARLIN_EVT_FilamentRunout) | MARLIN_EVT_MSK(MARLIN_EVT_UserConfirmRequired) | MARLIN_EVT_MSK(MARLIN_EVT_StatusChanged) | MARLIN_EVT_MSK(MARLIN_EVT_FactoryReset) | MARLIN_EVT_MSK(MARLIN_EVT_LoadSettings) | MARLIN_EVT_MSK(MARLIN_EVT_StoreSettings) | MARLIN_EVT_MSK(MARLIN_EVT_MeshUpdate) | MARLIN_EVT_MSK(MARLIN_EVT_HostPrompt) | MARLIN_EVT_MSK(MARLIN_EVT_StartProcessing) | MARLIN_EVT_MSK(MARLIN_EVT_StopProcessing) | MARLIN_EVT_MSK(MARLIN_EVT_Busy) | MARLIN_EVT_MSK(MARLIN_EVT_Ready) | MARLIN_EVT_MSK(MARLIN_EVT_Error) | MARLIN_EVT_MSK(MARLIN_EVT_CommandBegin) | MARLIN_EVT_MSK(MARLIN_EVT_CommandEnd) | MARLIN_EVT_MSK(MARLIN_EVT_SafetyTimerExpired) | MARLIN_EVT_MSK(MARLIN_EVT_Message) | MARLIN_EVT_MSK(MARLIN_EVT_Reheat) | MARLIN_EVT_MSK(MARLIN_EVT_Acknowledge))
50 #define MARLIN_CMD_NONE 0
51 #define MARLIN_CMD_G (((uint32_t)'G') << 16)
52 #define MARLIN_CMD_M (((uint32_t)'M') << 16)
53 #define MARLIN_CMD_G28 (MARLIN_CMD_G + 28)
54 #define MARLIN_CMD_G29 (MARLIN_CMD_G + 29)
55 #define MARLIN_CMD_M109 (MARLIN_CMD_M + 109)
56 #define MARLIN_CMD_M190 (MARLIN_CMD_M + 190)
57 #define MARLIN_CMD_M600 (MARLIN_CMD_M + 600)
58 #define MARLIN_CMD_M701 (MARLIN_CMD_M + 701)
59 #define MARLIN_CMD_M702 (MARLIN_CMD_M + 702)
61 #define MARLIN_MAX_MESH_POINTS (4 * 4)
120 #endif //_MARLIN_EVENTS_H
uint8_t evt_StopProcessing
Definition: marlin_events.h:89
union _marlin_events_t marlin_events_t
Definition: marlin_events.h:66
uint8_t evt_Acknowledge
Definition: marlin_events.h:97
uint8_t evt_LoadSettings
Definition: marlin_events.h:84
Definition: marlin_events.h:102
const char * marlin_events_get_name(uint8_t evt_id)
Definition: marlin_events.c:40
uint64_t evt_reserved
Definition: marlin_events.h:98
uint8_t xc
Definition: marlin_events.h:104
uint8_t evt_PrintTimerStarted
Definition: marlin_events.h:77
uint8_t evt_Error
Definition: marlin_events.h:92
uint8_t evt_UserConfirmRequired
Definition: marlin_events.h:81
uint8_t evt_SafetyTimerExpired
Definition: marlin_events.h:95
const char * __evt_name[]
Definition: marlin_events.c:7
uint8_t evt_StatusChanged
Definition: marlin_events.h:82
uint8_t evt_CommandBegin
Definition: marlin_events.h:93
uint8_t evt_Ready
Definition: marlin_events.h:91
uint8_t evt_MediaInserted
Definition: marlin_events.h:73
uint64_t evt
Definition: marlin_events.h:67
uint8_t evt_MediaError
Definition: marlin_events.h:74
uint8_t evt_Busy
Definition: marlin_events.h:90
uint8_t evt_Message
Definition: marlin_events.h:96
uint8_t evt_PrintTimerStopped
Definition: marlin_events.h:79
const uint8_t[]
Definition: 404_html.c:3
float z[MARLIN_MAX_MESH_POINTS]
Definition: marlin_events.h:103
uint8_t evt_PlayTone
Definition: marlin_events.h:76
uint8_t evt_FilamentRunout
Definition: marlin_events.h:80
const char * marlin_events_get_name(uint8_t evt_id)
Definition: marlin_events.c:40
uint8_t evt_PrintTimerPaused
Definition: marlin_events.h:78
uint8_t evt_Startup
Definition: marlin_events.h:70
uint8_t evt_MediaRemoved
Definition: marlin_events.h:75
uint8_t evt_FactoryReset
Definition: marlin_events.h:83
uint8_t yc
Definition: marlin_events.h:105
uint8_t evt_HostPrompt
Definition: marlin_events.h:87
uint8_t evt_PrinterKilled
Definition: marlin_events.h:72
struct _marlin_mesh_t marlin_mesh_t
uint8_t evt_CommandEnd
Definition: marlin_events.h:94
#define MARLIN_MAX_MESH_POINTS
Definition: marlin_events.h:61
#define MARLIN_EVT_MAX
Definition: marlin_events.h:39
uint8_t evt_MeshUpdate
Definition: marlin_events.h:86
uint8_t evt_Idle
Definition: marlin_events.h:71
uint8_t evt_StartProcessing
Definition: marlin_events.h:88
uint8_t evt_StoreSettings
Definition: marlin_events.h:85