ev3c_lcd

Some simple functions for drawing text and basic primitives to the lcd.

Summary
ev3c_lcdSome simple functions for drawing text and basic primitives to the lcd.
Macros
EV3_X_LCDx size of the EV3 screen (178)
EV3_Y_LCDy size of the EV3 screen (128)
EV3_S_LCDlength of the scanline of the EV3 screen in bytes (712)
EV3_SY_LCDproduct of the scanline length and the screen height as whole size of the screenbuffer array.
Functions
ev3_init_lcdInitializes the lcd.
ev3_text_lcd_largeDraws text in a large font (each letter 16x16)
ev3_text_lcd_normalDraws text in a normal font (each letter 8x9)
ev3_text_lcd_smallDraws text in a small font (each letter 8x8)
ev3_text_lcd_tinyDraws text in a tiny font (each letter 5x7)
ev3_clear_lcdBlanks the screen
ev3_rectangle_lcdDraws a filled rectangle
ev3_rectangle_lcd_outDraws a rectangle frame
ev3_circle_lcdDraws a filled circle
ev3_circle_lcd_outDraws a circle frame
ev3_ellipse_lcdDraws a filled ellipse
ev3_ellipse_lcd_outDraws a ellipse frame
ev3_line_lcdDraws a line

Macros

EV3_X_LCD

x size of the EV3 screen (178)

EV3_Y_LCD

y size of the EV3 screen (128)

EV3_S_LCD

length of the scanline of the EV3 screen in bytes (712)

EV3_SY_LCD

product of the scanline length and the screen height as whole size of the screenbuffer array.

Functions

ev3_init_lcd

void ev3_init_lcd()

Initializes the lcd.  You need to call this first!

ev3_text_lcd_large

void ev3_text_lcd_large(int32_t x,
int32_t y,
const char *text)

Draws text in a large font (each letter 16x16)

Parameter

x(int32_t) x position on the screen
y(int32_t) y position on the screen
text(const char*) text to draw

ev3_text_lcd_normal

void ev3_text_lcd_normal(int32_t x,
int32_t y,
const char *text)

Draws text in a normal font (each letter 8x9)

Parameter

x(int32_t) x position on the screen
y(int32_t) y position on the screen
text(const char*) text to draw

ev3_text_lcd_small

void ev3_text_lcd_small(int32_t x,
int32_t y,
const char *text)

Draws text in a small font (each letter 8x8)

Parameter

x(int32_t) x position on the screen
y(int32_t) y position on the screen
text(const char*) text to draw

ev3_text_lcd_tiny

void ev3_text_lcd_tiny(int32_t x,
int32_t y,
const char *text)

Draws text in a tiny font (each letter 5x7)

Parameter

x(int32_t) x position on the screen
y(int32_t) y position on the screen
text(const char*) text to draw

ev3_clear_lcd

void ev3_clear_lcd()

Blanks the screen

ev3_rectangle_lcd

void ev3_rectangle_lcd(int32_t x,
int32_t y,
int32_t w,
int32_t h,
int32_t bit)

Draws a filled rectangle

Parameter

x,y(int32_t,int32_t) position of the left upper corner of the rectangle
w(int32_t) width of the rectangle
h(int32_t) height of the rectangle
bitcolor of the rectangle (1 black, 0 white)

ev3_rectangle_lcd_out

void ev3_rectangle_lcd_out(int32_t x,
int32_t y,
int32_t w,
int32_t h,
int32_t bit)

Draws a rectangle frame

Parameter

x,y(int32_t,int32_t) position of the left upper corner of the rectangle
w(int32_t) width of the rectangle
h(int32_t) height of the rectangle
bitcolor of the rectangle (1 black, 0 white)

ev3_circle_lcd

void ev3_circle_lcd(int32_t x,
int32_t y,
int32_t r,
int32_t bit)

Draws a filled circle

Parameter

x,y(int32_t,int32_t) position of the center of the circle
r(int32_t) radius of the circle
bitcolor of the circle (1 black, 0 white)

ev3_circle_lcd_out

void ev3_circle_lcd_out(int32_t x,
int32_t y,
int32_t r,
int32_t bit)

Draws a circle frame

Parameter

x,y(int32_t,int32_t) position of the center of the circle
r(int32_t) radius of the circle
bitcolor of the circle (1 black, 0 white)

ev3_ellipse_lcd

void ev3_ellipse_lcd(int32_t x,
int32_t y,
int32_t rx,
int32_t ry,
int32_t bit)

Draws a filled ellipse

Parameter

x,y(int32_t,int32_t) position of the center of the ellipse
rx,ry(int32_t,int32_t) x and y radius of the ellipse
bitcolor of the circle (1 black, 0 white)

ev3_ellipse_lcd_out

void ev3_ellipse_lcd_out(int32_t x,
int32_t y,
int32_t rx,
int32_t ry,
int32_t bit)

Draws a ellipse frame

Parameter

x,y(int32_t,int32_t) position of the center of the ellipse
rx,ry(int32_t,int32_t) x and y radius of the ellipse
bitcolor of the circle (1 black, 0 white)

ev3_line_lcd

void ev3_line_lcd(int32_t x0,
int32_t y0,
int32_t x1,
int32_t y1,
int32_t bit)

Draws a line

Parameter

x0,y0(int32_t,int32_t) start of the line
x1,y1(int32_t,int32_t) end of the line
bitcolor of the line (1 black, 0 white)
void ev3_init_lcd()
Initializes the lcd.
void ev3_text_lcd_large(int32_t x,
int32_t y,
const char *text)
Draws text in a large font (each letter 16x16)
void ev3_text_lcd_normal(int32_t x,
int32_t y,
const char *text)
Draws text in a normal font (each letter 8x9)
void ev3_text_lcd_small(int32_t x,
int32_t y,
const char *text)
Draws text in a small font (each letter 8x8)
void ev3_text_lcd_tiny(int32_t x,
int32_t y,
const char *text)
Draws text in a tiny font (each letter 5x7)
void ev3_clear_lcd()
Blanks the screen
void ev3_rectangle_lcd(int32_t x,
int32_t y,
int32_t w,
int32_t h,
int32_t bit)
Draws a filled rectangle
void ev3_rectangle_lcd_out(int32_t x,
int32_t y,
int32_t w,
int32_t h,
int32_t bit)
Draws a rectangle frame
void ev3_circle_lcd(int32_t x,
int32_t y,
int32_t r,
int32_t bit)
Draws a filled circle
void ev3_circle_lcd_out(int32_t x,
int32_t y,
int32_t r,
int32_t bit)
Draws a circle frame
void ev3_ellipse_lcd(int32_t x,
int32_t y,
int32_t rx,
int32_t ry,
int32_t bit)
Draws a filled ellipse
void ev3_ellipse_lcd_out(int32_t x,
int32_t y,
int32_t rx,
int32_t ry,
int32_t bit)
Draws a ellipse frame
void ev3_line_lcd(int32_t x0,
int32_t y0,
int32_t x1,
int32_t y1,
int32_t bit)
Draws a line
Close