-
Notifications
You must be signed in to change notification settings - Fork 1
/
menu.h
32 lines (24 loc) · 1.13 KB
/
menu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef MENU_H_
#define MENU_H_
typedef void (*click_t)(uint8_t line, volatile long &pos, bool &adjustValue, uint8_t arg);
typedef void (*show_t)(uint8_t line, uint8_t arg);
typedef void (*adjust_t)(uint8_t line, volatile long &pos, uint8_t arg);
typedef struct {
char name[24];
show_t show;
click_t click;
adjust_t adjust;
uint8_t arg;
} menu_t;
void mct_ClickMenu(uint8_t line, volatile long &pos, bool &adjustValue, uint8_t newMenu);
void mct_Show(uint8_t line, const char *value);
void mct_AdjustTemp(uint8_t line, volatile long &pos, uint8_t arg);
void mct_ShowNozzle(uint8_t line, uint8_t extruder);
void mct_ClickNozzle(uint8_t line, volatile long &pos, bool &adjustValue, uint8_t extruder);
void mct_ShowBed(uint8_t line, uint8_t which);
void mct_ClickBed(uint8_t line, volatile long &pos, bool &adjustValue, uint8_t which);
void mct_ShowFan(uint8_t line, uint8_t which);
void mct_ClickFan(uint8_t line, volatile long &pos, bool &adjustValue, uint8_t which);
void mct_AdjustFan(uint8_t line, volatile long &pos, uint8_t arg);
void mp_ClickStore(uint8_t line, volatile long &pos, bool &adjustValue, uint8_t which);
#endif