drv_pcd8544.c File Reference

Draw drivers for PCD8544 based LCD display (Nokia 3310). More...

Include dependency graph for drv_pcd8544.c:

Functions

void drv_init ()
void drv_paint ()
void drv_setup_io ()

Detailed Description


Function Documentation

void drv_init (  ) 

00089                 {
00090     pcd8544_init();
00091 }   

Here is the call graph for this function:

void drv_paint (  ) 

00045                  {
00046 
00047 uns8 count;
00048 uns8 x, y, inv_y;
00049 uns16 buffer_loc;
00050 uns16 byte_loc;
00051 uns8  bit_loc, byte_out;
00052 
00053 serial_print_str("paint! ");
00054 
00055 // set x,y location to 0
00056 pcd8544_send_command(0x80);
00057 
00058 pcd8544_send_command(0x40);
00059 
00060 
00061 byte_out = 0;
00062 
00063 for(x = 0 ; x < DRAW_PIXELS_WIDE  ; x++) {
00064             
00065     for(y = 0 ; y < DRAW_PIXELS_HIGH ; y++) {
00066             buffer_loc = y * DRAW_PIXELS_WIDE + x;
00067             byte_loc = buffer_loc / DRAW_PIXELS_PER_BYTE;
00068             bit_loc = buffer_loc & (DRAW_PIXELS_PER_BYTE -1);
00069             
00070             byte_out = byte_out >> 1;
00071             if (test_bit(get_draw_buffer(byte_loc), bit_loc)) {
00072                 byte_out.7  = 1;
00073             } else {
00074                 byte_out.7  = 0;
00075             }
00076             if ((y & 0b00000111) == 0b00000111) {
00077                 pcd8544_send_data(byte_out);
00078             }   
00079         }
00080     }
00081 }   

Here is the call graph for this function:

void drv_setup_io (  ) 

00085                     {
00086     pcd8544_setup_io();
00087 }

Here is the call graph for this function:


Generated on Fri Aug 19 09:05:04 2011 for Pic Pack Library by  doxygen 1.6.1