User manual

Table Of Contents
mikroC PRO for PIC32
MikroElektronika
489
SPI_Glcd_Line
SPI_Glcd_V_Line
Prototype
void SPI_Glcd_Line(int x_start, int y_start, int x_end, int y_end, char
color);
Description Draws a line on Glcd.
Parameters:
Parameters - x_start: x coordinate of the line start. Valid values: 0..127
- y_start: y coordinate of the line start. Valid values: 0..63
- x_end: x coordinate of the line end. Valid values: 0..127
- y_end: y coordinate of the line end. Valid values: 0..63
- color: color parameter. Valid values: 0..2
Parameter color determines the line color: 0 white, 1 black, and 2 inverts each dot.
Returns Nothing.
Requires Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routine.
Example
// Draw a line between dots (0,0) and (20,30)
SPI_Glcd_Line(0, 0, 20, 30, 1);
Notes None.
Prototype
void SPI_Glcd_V_Line(char y_start, char y_end, char x_pos, char color);
Description Draws a vertical line on Glcd.
Parameters - y_start: y coordinate of the line start. Valid values: 0..63
- y_end: y coordinate of the line end. Valid values: 0..63
- x_pos: x coordinate of vertical line. Valid values: 0..127
- color: color parameter. Valid values: 0..2
Parameter color determines the line color: 0 white, 1 black, and 2 inverts each dot.
Returns Nothing.
Requires Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routine.
Example
// Draw a vertical line between dots (10,5) and (10,25)
SPI_Glcd_V_Line(5, 25, 10, 1);
Notes None.