Go to the source code of this file.
Functions | |
| void | bt_clear () |
| void | bt_clear_display (int display_no) |
| void | bt_print_char_lcd (int row, int col, BYTE ch) |
| void | bt_write_char (int row, int col, BYTE ch) |
| void | bt_write_char_display (int display_no, int row, int col, BYTE ch) |
| void | bt_write_hcilab_display (int display_no, int row, int col) |
| void | bt_write_line (int row, int ch) |
| void | bt_write_line_display (int display_no, int row, int ch) |
| void | bt_write_long4 (int row, int col, long long_val) |
| void | bt_write_long4_display (int display_no, int row, int col, long long_val) |
| void | bt_write_pix_set_display (int display_no, int row, int col, int ch, int count) |
| void | bt_write_string (int row, int col, char *str) |
| void | bt_write_string_display (int display_no, int row, int col, char *str) |
| void | write_pix_set (int row, int col, int ch, int count) |
|
|
Clears the standard display. Definition at line 365 of file bt96040.c. References bt_write_line(). 00366 {
00367 bt_write_line(0x00,0x00);
00368 bt_write_line(0x01,0x00);
00369 bt_write_line(0x02,0x00);
00370 bt_write_line(0x03,0x00);
00371 bt_write_line(0x04,0x00);
00372 }
|
|
|
Clears the display number display_no.
Definition at line 352 of file bt96040.c. References bt_write_line_display(). 00353 {
00354 bt_write_line_display(display_no, 0x00,0x00);
00355 bt_write_line_display(display_no, 0x01,0x00);
00356 bt_write_line_display(display_no, 0x02,0x00);
00357 bt_write_line_display(display_no, 0x03,0x00);
00358 bt_write_line_display(display_no, 0x04,0x00);
00359 }
|
|
||||||||||||||||
|
Deprecated. Use bt_write_char instead.
Definition at line 426 of file bt96040.c. References bt_write_char(). 00427 {
00428 bt_write_char(row, col, ch);
00429 }
|
|
||||||||||||||||
|
Extracts ascii from tables & write to the standard display.
Definition at line 437 of file bt96040.c. References table1, table2, and write_pix_set(). Referenced by bt_print_char_lcd(), and bt_write_string(). 00438 {
00439 int tab_index;
00440 BYTE bt_char_bit_set;
00441 //int ch_pix_set;
00442 int i;
00443
00444 if (ch<0x20)return;
00445 if (ch>0x7f)return;
00446
00447 for (i=0;i<5;i++)
00448 {
00449 if (ch<0x50)
00450 {
00451 tab_index=(((ch&0xff)-0x20)*5);
00452 bt_char_bit_set=table1[(tab_index+i)];
00453 }
00454 else if (ch>0x4f)
00455 {
00456 tab_index=(((ch&0xff)-0x50)*5);
00457 tab_index=(((ch&0xff)-0x50)*5);
00458 tab_index=(((ch&0xff)-0x50)*5);
00459 bt_char_bit_set=table2[(tab_index+i)];
00460 }
00461 write_pix_set(row, col+i, bt_char_bit_set,1);
00462 }
00463 write_pix_set(row, col+5, 0x00,1);
00464 }
|
|
||||||||||||||||||||
|
Writes a char to a named display.
Definition at line 220 of file bt96040.c. References bt_write_pix_set_display(), table1, and table2. Referenced by bt_write_string_display(). 00221 {
00222 int tab_index;
00223 BYTE bt_char_bit_set;
00224 //int ch_pix_set;
00225 int i;
00226
00227 if (ch<0x20)return;
00228 if (ch>0x7f)return;
00229
00230 for (i=0;i<5;i++) {
00231 if (ch<0x50){
00232 tab_index=(((ch&0xff)-0x20)*5);
00233 bt_char_bit_set=table1[(tab_index+i)];
00234 } else if (ch>0x4f){
00235 tab_index=(((ch&0xff)-0x50)*5);
00236 tab_index=(((ch&0xff)-0x50)*5);
00237 tab_index=(((ch&0xff)-0x50)*5);
00238 bt_char_bit_set=table2[(tab_index+i)];
00239 }
00240 bt_write_pix_set_display(display_no, row, col+i, bt_char_bit_set,1);
00241 }
00242 bt_write_pix_set_display(display_no, row, col+5, 0x00,1);
00243
00244 }
|
|
||||||||||||||||
|
Writes the string "HCILAB.ORG" in row at character column col. Attention: Character position is BT_CHARACTER_PIXEL_WIDTH*col. So the starting position is defined in characters, not pixels.
Definition at line 103 of file bt96040.c. References bt_write_string_display(). 00104 {
00105 char hcilab[11] = "HCILAB.ORG";
00106 bt_write_string_display(display_no, row, col, hcilab);
00107 /*
00108 int cur_pos = 0;
00109 cur_pos = BT_CHARACTER_PIXEL_WIDTH * col;
00110 bt_write_char_display(display_no, row,cur_pos, 'H'); cur_pos=cur_pos+BT_CHARACTER_PIXEL_WIDTH;
00111 bt_write_char_display(display_no, row,cur_pos,'C'); cur_pos=cur_pos+BT_CHARACTER_PIXEL_WIDTH;
00112 bt_write_char_display(display_no, row,cur_pos,'I'); cur_pos=cur_pos+BT_CHARACTER_PIXEL_WIDTH;
00113 bt_write_char_display(display_no, row,cur_pos,'L'); cur_pos=cur_pos+BT_CHARACTER_PIXEL_WIDTH;
00114 bt_write_char_display(display_no, row,cur_pos,'A'); cur_pos=cur_pos+BT_CHARACTER_PIXEL_WIDTH;
00115 bt_write_char_display(display_no, row,cur_pos,'B'); cur_pos=cur_pos+BT_CHARACTER_PIXEL_WIDTH;
00116 bt_write_char_display(display_no, row,cur_pos,'.'); cur_pos=cur_pos+BT_CHARACTER_PIXEL_WIDTH;
00117 bt_write_char_display(display_no, row,cur_pos,'O'); cur_pos=cur_pos+BT_CHARACTER_PIXEL_WIDTH;
00118 bt_write_char_display(display_no, row,cur_pos,'R'); cur_pos=cur_pos+BT_CHARACTER_PIXEL_WIDTH;
00119 bt_write_char_display(display_no, row,cur_pos,'G');
00120 */
00121 }
|
|
||||||||||||
|
Writes a line of the character ch to the standard display. The line starts in row and writes ch rows (binary representation of the int (ch), 1 = row 1, 2 = row 2, 3 = row 1 & 2, 4 = row 3, ...)
Definition at line 382 of file bt96040.c. Referenced by bt_clear(). 00383 {
00384 int i;
00385 i2c_start();
00386 // send address 0x7A
00387 i2c_write(0x7A);
00388 i2c_write(0b01100000+row);
00389 i2c_write(0b00000000);
00390 for(i=0;i<100;i++)
00391 {
00392 i2c_write(ch);
00393 }
00394 // end transfer
00395 i2c_stop();
00396 }
|
|
||||||||||||||||
|
Writes a line of the character ch to a named display.
Definition at line 129 of file bt96040.c. Referenced by bt_clear_display(). 00130 {
00131 int i;
00132 if (display_no == 0) {
00133 #use i2c(master, sda=PIN_DISPLAY_1_I2C_SDA, scl=PIN_DISPLAY_1_I2C_SCL)
00134
00135 i2c_start();
00136 i2c_write(0x7A); // send address 0x7A
00137 i2c_write(0b01100000+row);
00138 i2c_write(0b00000000);
00139 for(i=0;i<100;i++){
00140 i2c_write(ch);
00141 }
00142 i2c_stop(); // end transfer
00143 }
00144
00145 if (display_no == 1) {
00146 #use i2c(master, sda=PIN_DISPLAY_2_I2C_SDA, scl=PIN_DISPLAY_1_I2C_SCL)
00147
00148 i2c_start();
00149 i2c_write(0x7A); // send address 0x7A
00150 i2c_write(0b01100000+row);
00151 i2c_write(0b00000000);
00152 for(i=0;i<100;i++){
00153 i2c_write(ch);
00154 }
00155 i2c_stop(); // end transfer
00156 }
00157
00158 if (display_no == 2) {
00159 #use i2c(master, sda=PIN_B2, scl=PIN_DISPLAY_1_I2C_SCL)
00160
00161 i2c_start();
00162 i2c_write(0x7A); // send address 0x7A
00163 i2c_write(0b01100000+row);
00164 i2c_write(0b00000000);
00165 for(i=0;i<100;i++){
00166 i2c_write(ch);
00167 }
00168 i2c_stop(); // end transfer
00169 }
00170
00171 if (display_no == 3) {
00172 #use i2c(master, sda=PIN_B3, scl=PIN_DISPLAY_1_I2C_SCL)
00173
00174 i2c_start();
00175 i2c_write(0x7A); // send address 0x7A
00176 i2c_write(0b01100000+row);
00177 i2c_write(0b00000000);
00178 for(i=0;i<100;i++){
00179 i2c_write(ch);
00180 }
00181 i2c_stop(); // end transfer
00182 }
00183
00184 if (display_no == 4) {
00185 #use i2c(master, sda=PIN_B4, scl=PIN_DISPLAY_1_I2C_SCL)
00186
00187 i2c_start();
00188 i2c_write(0x7A); // send address 0x7A
00189 i2c_write(0b01100000+row);
00190 i2c_write(0b00000000);
00191 for(i=0;i<100;i++){
00192 i2c_write(ch);
00193 }
00194 i2c_stop(); // end transfer
00195 }
00196
00197 if (display_no == 5) {
00198 #use i2c(master, sda=PIN_B5, scl=PIN_DISPLAY_1_I2C_SCL)
00199
00200 i2c_start();
00201 i2c_write(0x7A); // send address 0x7A
00202 i2c_write(0b01100000+row);
00203 i2c_write(0b00000000);
00204 for(i=0;i<100;i++){
00205 i2c_write(ch);
00206 }
00207 i2c_stop(); // end transfer
00208 }
00209
00210 }
|
|
||||||||||||||||
|
Writes a long int (length: 4 characters) to the standard display.
Definition at line 31 of file bt96040.c. References bt_write_string(). 00032 {
00033 char str_long[5];
00034 sprintf(str_long, "%04li", long_val);
00035 bt_write_string(row, col, str_long);
00036 }
|
|
||||||||||||||||||||
|
Writes a long int (length: 4 characters) to a named display.
Definition at line 45 of file bt96040.c. References bt_write_string_display(). 00046 {
00047 char str_long[5];
00048 sprintf(str_long, "%04li", long_val);
00049 bt_write_string_display(display_no, row, col, str_long);
00050 }
|
|
||||||||||||||||||||||||
|
???
Definition at line 254 of file bt96040.c. Referenced by bt_write_char_display(). 00255 {
00256 int i;
00257
00258 if (display_no == 0) {
00259 #use i2c(master, sda=PIN_DISPLAY_1_I2C_SDA, scl=PIN_DISPLAY_1_I2C_SCL)
00260
00261 i2c_start();
00262 i2c_write(0x7A); // send address 0x7A
00263 i2c_write(0b01100000+row);
00264 i2c_write(0b00000000+col);
00265 for(i=0;i<count;i++){
00266 i2c_write(ch);
00267 }
00268 i2c_stop(); // end transfer
00269 }
00270
00271 if (display_no == 1) {
00272 #use i2c(master, sda=PIN_DISPLAY_2_I2C_SDA, scl=PIN_DISPLAY_1_I2C_SCL)
00273
00274
00275 i2c_start();
00276 i2c_write(0x7A); // send address 0x7A
00277 i2c_write(0b01100000+row);
00278 i2c_write(0b00000000+col);
00279 for(i=0;i<count;i++){
00280 i2c_write(ch);
00281 }
00282 i2c_stop(); // end transfer
00283 }
00284
00285 if (display_no == 2) {
00286 #use i2c(master, sda=PIN_DISPLAY_3_I2C_SDA, scl=PIN_DISPLAY_1_I2C_SCL)
00287 //#use i2c(master, sda=PIN_B2, scl=PIN_DISPLAY_1_I2C_SCL)
00288
00289
00290 i2c_start();
00291 i2c_write(0x7A); // send address 0x7A
00292 i2c_write(0b01100000+row);
00293 i2c_write(0b00000000+col);
00294 for(i=0;i<count;i++){
00295 i2c_write(ch);
00296 }
00297 i2c_stop(); // end transfer
00298 }
00299
00300 if (display_no == 3) {
00301 #use i2c(master, sda=PIN_DISPLAY_4_I2C_SDA, scl=PIN_DISPLAY_1_I2C_SCL)
00302 //#use i2c(master, sda=PIN_B3, scl=PIN_DISPLAY_1_I2C_SCL)
00303
00304
00305 i2c_start();
00306 i2c_write(0x7A); // send address 0x7A
00307 i2c_write(0b01100000+row);
00308 i2c_write(0b00000000+col);
00309 for(i=0;i<count;i++){
00310 i2c_write(ch);
00311 }
00312 i2c_stop(); // end transfer
00313 }
00314
00315 if (display_no == 4) {
00316 #use i2c(master, sda=PIN_DISPLAY_5_I2C_SDA, scl=PIN_DISPLAY_1_I2C_SCL)
00317 //#use i2c(master, sda=PIN_B4, scl=PIN_DISPLAY_1_I2C_SCL)
00318
00319
00320 i2c_start();
00321 i2c_write(0x7A); // send address 0x7A
00322 i2c_write(0b01100000+row);
00323 i2c_write(0b00000000+col);
00324 for(i=0;i<count;i++){
00325 i2c_write(ch);
00326 }
00327 i2c_stop(); // end transfer
00328 }
00329
00330 if (display_no == 5) {
00331 #use i2c(master, sda=PIN_DISPLAY_6_I2C_SDA, scl=PIN_DISPLAY_1_I2C_SCL)
00332 //#use i2c(master, sda=PIN_B5, scl=PIN_DISPLAY_1_I2C_SCL)
00333
00334
00335 i2c_start();
00336 i2c_write(0x7A); // send address 0x7A
00337 i2c_write(0b01100000+row);
00338 i2c_write(0b00000000+col);
00339 for(i=0;i<count;i++){
00340 i2c_write(ch);
00341 }
00342 i2c_stop(); // end transfer
00343 }
00344
00345
00346 }
|
|
||||||||||||||||
|
Prints a character array to the standard display
Definition at line 58 of file bt96040.c. References BT_CHARACTER_PIXEL_WIDTH, and bt_write_char(). Referenced by bt_write_long4(). 00059 {
00060 int strpos;
00061 strpos = 0;
00062
00063 // change commented lines against for loop...
00064 for (; *str != '\0'; str++)
00065 //while (*str != '\0')
00066 {
00067 bt_write_char(row, (col + (strpos * BT_CHARACTER_PIXEL_WIDTH)), *str);
00068 strpos++;
00069 //str++;
00070 }
00071 }
|
|
||||||||||||||||||||
|
Prints a character array to a named display
Definition at line 80 of file bt96040.c. References BT_CHARACTER_PIXEL_WIDTH, and bt_write_char_display(). Referenced by bt_write_hcilab_display(), and bt_write_long4_display(). 00081 {
00082 int strpos;
00083 strpos = 0;
00084
00085 // change commented lines against for loop...
00086 for (; *str != '\0'; str++)
00087 //while (*str != '\0')
00088 {
00089 bt_write_char_display(display_no, row, (col + (strpos * BT_CHARACTER_PIXEL_WIDTH)), *str);
00090 strpos++;
00091 //str++;
00092 }
00093 }
|
|
||||||||||||||||||||
|
???
Definition at line 405 of file bt96040.c. Referenced by bt_write_char(). 00406 {
00407 int i;
00408 i2c_start();
00409 // send address 0x7A
00410 i2c_write(0x7A);
00411 i2c_write(0b01100000+row);
00412 i2c_write(0b00000000+col);
00413 for(i=0;i<count;i++)
00414 {
00415 i2c_write(ch);
00416 }
00417 // end transfer
00418 i2c_stop();
00419 }
|
1.3.9.1