User manual

Table Of Contents
490
mikoC PRO for PIC32
MikroElektronika
SPI_Glcd_H_Line
SPI_Glcd_Rectangle
Prototype
void SPI_Glcd_H_Line(char x_start, char x_end, char y_pos, char color);
Description Draws a horizontal line on Glcd.
Parameters - x_start: x coordinate of the line start. Valid values: 0..127
- x_end: x coordinate of the line end. Valid values: 0..127
- y_pos: y coordinate of horizontal line. Valid values: 0..63
- color: color parameter. Valid values: 0..2
The 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 horizontal line between dots (10,20) and (50,20)
SPI_Glcd_H_Line(10, 50, 20, 1);
Notes None.
Prototype
void SPI_Glcd_Rectangle(char x_upper_left, char y_upper_left, char x_bottom_
right, char y_bottom_right, char color);
Description Draws a rectangle on Glcd.
Parameters - x_upper_left: x coordinate of the upper left rectangle corner. Valid values: 0..127
- y_upper_left: y coordinate of the upper left rectangle corner. Valid values: 0..63
- x_bottom_right: x coordinate of the lower right rectangle corner. Valid values: 0..127
- y_bottom_right: y coordinate of the lower right rectangle corner. Valid values: 0..63
- color: color parameter. Valid values: 0..2
The parameter color determines the color of the rectangle border: 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 rectangle between dots (5,5) and (40,40)
SPI_Glcd_Rectangle(5, 5, 40, 40, 1);
Notes None.