More AVR removal

This commit is contained in:
Bertrand Songis
2018-08-05 12:39:05 +02:00
parent f3bfde242b
commit ea76998beb
67 changed files with 1321 additions and 1486 deletions
+3 -3
View File
@@ -182,10 +182,10 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
tmr10ms_t menuEntryTime;
#define MAXCOL(row) (horTab ? pgm_read_byte(horTab+min(row, (vertpos_t)horTabMax)) : (const uint8_t)0)
#define MAXCOL(row) (horTab ? *(horTab+min(row, (vertpos_t)horTabMax)) : (const uint8_t)0)
#define POS_HORZ_INIT(posVert) 0
void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow)
void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t menuTabSize, const uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow)
{
vertpos_t l_posVert = menuVerticalPosition;
horzpos_t l_posHorz = menuHorizontalPosition;
@@ -275,7 +275,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t
}
if (cc != curr) {
chainMenu((MenuHandlerFunc)pgm_read_adr(&menuTab[cc]));
chainMenu(menuTab[cc]);
}
#if defined(ROTARY_ENCODER_NAVIGATION)
@@ -339,7 +339,7 @@ int8_t navigate(event_t event, int count, int rows, int columns, bool loop)
return (prevPosHorz != menuHorizontalPosition || prevPosVert != menuVerticalPosition) ? result : 0;
}
bool check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t menuTabSize, const pm_uint8_t * horTab, uint8_t horTabMax, int rowcount, uint8_t flags)
bool check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t menuTabSize, const uint8_t * horTab, uint8_t horTabMax, int rowcount, uint8_t flags)
{
uint8_t maxcol = MAXCOL(menuVerticalPosition);
@@ -372,7 +372,7 @@ bool check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t
}
if (cc != curr) {
chainMenu((MenuHandlerFunc)pgm_read_adr(&menuTab[cc]));
chainMenu(menuTab[cc]);
return false;
}
+3 -3
View File
@@ -240,13 +240,13 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
tmr10ms_t menuEntryTime;
#define MAXCOL_RAW(row) (horTab ? pgm_read_byte(horTab+min(row, (vertpos_t)horTabMax)) : (const uint8_t)0)
#define MAXCOL_RAW(row) (horTab ? *(horTab+min(row, (vertpos_t)horTabMax)) : (const uint8_t)0)
#define MAXCOL(row) (MAXCOL_RAW(row) >= HIDDEN_ROW ? MAXCOL_RAW(row) : (const uint8_t)(MAXCOL_RAW(row) & (~NAVIGATION_LINE_BY_LINE)))
#define COLATTR(row) (MAXCOL_RAW(row) == (uint8_t)-1 ? (const uint8_t)0 : (const uint8_t)(MAXCOL_RAW(row) & NAVIGATION_LINE_BY_LINE))
#define MENU_FIRST_LINE_EDIT (menuTab ? (MAXCOL((uint16_t)0) >= HIDDEN_ROW ? (MAXCOL((uint16_t)1) >= HIDDEN_ROW ? 2 : 1) : 0) : 0)
#define POS_HORZ_INIT(posVert) ((COLATTR(posVert) & NAVIGATION_LINE_BY_LINE) ? -1 : 0)
void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t menuTabSize, const pm_uint8_t * horTab, uint8_t horTabMax, vertpos_t rowcount)
void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t menuTabSize, const uint8_t * horTab, uint8_t horTabMax, vertpos_t rowcount)
{
vertpos_t l_posVert = menuVerticalPosition;
horzpos_t l_posHorz = menuHorizontalPosition;
@@ -273,7 +273,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t
}
if (!menuCalibrationState && cc != curr) {
chainMenu((MenuHandlerFunc)pgm_read_adr(&menuTab[cc]));
chainMenu(menuTab[cc]);
}
drawScreenIndex(curr, menuTabSize, 0);
+3 -3
View File
@@ -316,7 +316,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
}
#define CURSOR_NOT_ALLOWED_IN_ROW(row) ((int8_t)MAXCOL(row) < 0)
#define MAXCOL_RAW(row) (horTab ? pgm_read_byte(horTab+min(row, (vertpos_t)horTabMax)) : (const uint8_t)0)
#define MAXCOL_RAW(row) (horTab ? *(horTab+min(row, (vertpos_t)horTabMax)) : (const uint8_t)0)
#define MAXCOL(row) (MAXCOL_RAW(row) >= HIDDEN_ROW ? MAXCOL_RAW(row) : (const uint8_t)(MAXCOL_RAW(row) & (~NAVIGATION_LINE_BY_LINE)))
#define COLATTR(row) (MAXCOL_RAW(row) == (uint8_t)-1 ? (const uint8_t)0 : (const uint8_t)(MAXCOL_RAW(row) & NAVIGATION_LINE_BY_LINE))
#define INC(val, min, max) if (val<max) {val++;} else if (max>min) {val=min;}
@@ -336,7 +336,7 @@ void onLongMenuPress(const char * result)
tmr10ms_t menuEntryTime;
void check(const char * name, event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, vertpos_t rowcount, uint8_t flags)
void check(const char * name, event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t menuTabSize, const uint8_t *horTab, uint8_t horTabMax, vertpos_t rowcount, uint8_t flags)
{
vertpos_t l_posVert = menuVerticalPosition;
horzpos_t l_posHorz = menuHorizontalPosition;
@@ -377,7 +377,7 @@ void check(const char * name, event_t event, uint8_t curr, const MenuHandlerFunc
}
if (!menuCalibrationState && cc != curr) {
chainMenu((MenuHandlerFunc)pgm_read_adr(&menuTab[cc]));
chainMenu(menuTab[cc]);
}
if (!(flags&CHECK_FLAG_NO_SCREEN_INDEX)) {
@@ -302,11 +302,11 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
tmr10ms_t menuEntryTime;
#define MAXCOL_RAW(row) (horTab ? pgm_read_byte(horTab+min(row, (vertpos_t)horTabMax)) : (const uint8_t)0)
#define MAXCOL_RAW(row) (horTab ? *(horTab+min(row, (vertpos_t)horTabMax)) : (const uint8_t)0)
#define MAXCOL(row) (MAXCOL_RAW(row) >= HIDDEN_ROW ? MAXCOL_RAW(row) : (const uint8_t)(MAXCOL_RAW(row) & (~NAVIGATION_LINE_BY_LINE)))
#define POS_HORZ_INIT(posVert) 0
void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow)
void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t menuTabSize, const uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow)
{
vertpos_t l_posVert = menuVerticalPosition;
horzpos_t l_posHorz = menuHorizontalPosition;
@@ -362,7 +362,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t
}
if (cc != curr) {
chainMenu((MenuHandlerFunc)pgm_read_adr(&menuTab[cc]));
chainMenu(menuTab[cc]);
}
#if defined(ROTARY_ENCODER_NAVIGATION)