Bonjour,
je vois a peu près ce que fait cette fonction mais je souhaiterais comprendre exactement ce qu'il se passe:
Code C : Sélectionner tout - Visualiser dans une fenêtre à part
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 /******************************************************************************* * Set draw window region * * Parameter: x: horizontal position * * y: vertical position * * w: window width in pixel * * h: window height in pixels * * Return: * *******************************************************************************/ void GLCD_SetWindow (unsigned int x, unsigned int y, unsigned int w, unsigned int h) { wr_cmd (0x2A); // Column Address Set (2Ah) wr_dat(((x ) >> 8) & 0xFF); wr_dat(((x ) ) & 0xFF); wr_dat(((x+w-1) >> 8) & 0xFF); wr_dat(((x+w-1) ) & 0xFF); wr_cmd (0x2B); // Page Address Set (2Bh) wr_dat(((y ) >> 8) & 0xFF); wr_dat(((y ) ) & 0xFF); wr_dat(((y+h-1) >> 8) & 0xFF); wr_dat(((y+h-1) ) & 0xFF); wr_cmd (0x2C); // Memory Write (2Ch) }
Voici les paramètres entrant ==> GLCD_DrawChar(col * 6, ln * 8, 6, 8, (unsigned char *)&Font_6x8_h [c * 8]); ( col * 6 = x / ln * 8 = y / 6 = w et 8 = h)
Ci-joint également la doc du lcd (colonne adresse & page adresse).
Je crois comprendre qu'avec cette fonction on exécute une routine pour allouer de la mémoire qui correspondra a l'encadrement de mon caractère ( on prédéfinis un cadre ou mon caractère sera écris puis affiché)
Après il me semble que SC et EC correspondent a Start column et End column idem pour SP et EP, Start page et End page ?
Si ligne et colonne = 0 soit le premier caractère je trouve comme delimitation en colonne Sc11 = 1 et Ec4 = 1et pour page Sp11 = 1 et Ec0,1,2,3 = 1
Du coup je ne comprends pas comment exploiter ces bits mis a 1 si ca quelqu'un peut m’éclairer
Merci
Partager