1 2 3 4 5 6 7 8 9 10 11 12 | void TFT_PIXEL_Draw(INT16U x, INT16U y, INT16U color) { LCD_param lcd; lcd.xs = x; lcd.xe = x; lcd.ys = y; lcd.ye = y; TFT_GRAM_ADD_Setup(&lcd); TFT_WR_GRAM(color); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | void TFT_XLINE_Draw(INT16U xs, INT16U xe, INT16U ys, INT16U ye, INT16U color) { LCD_param lcd; INT16U i; lcd.xs = xs; lcd.xe = xe; lcd.ys = ys; lcd.ye = ys; TFT_GRAM_ADD_Setup(&lcd); //xs~xe pixel 만큼 color를 부려줌. for( i = 0 ; i < (xe - xs + 1 ) ; i++ ) TFT_WR_GRAM(color); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | void TFT_REC_Fill(INT16U xs, INT16U xe, INT16U ys, INT16U ye, INT16U color) { LCD_param lcd; INT32U i,j; lcd.xs = xs; lcd.xe = xe; lcd.ys = ys; lcd.ye = ye; TFT_GRAM_ADD_Setup(&lcd); j = xe - xs + 1; j = j*( ye - ys + 1 ); for( i = 0 ; i < j ; i++ ) TFT_WR_GRAM(color); } |
'Project > └ ATmega128' 카테고리의 다른 글
AVR로 서보모터 제어하기 (2) | 2013.09.18 |
---|---|
[AVR]서보모터 제어 (1) | 2013.09.12 |