_LCD1602_struct.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. struct _LCD_print_bufforS {
  2. int screenID;
  3. int cursor1;
  4. int cursor2;
  5. int character ;
  6. long time_seq_id;
  7. long time_min_run;
  8. } ;
  9. typedef struct _LCD_print_bufforS _LCD_print_bufforT;
  10. //struct LCDarray1S {
  11. // char LCDarray1[16];
  12. //}
  13. struct _LCD_print_screenS {
  14. int screenID;
  15. char LCDarray1;
  16. char LCDarray2;
  17. long time_seq_id;
  18. long time_min_run;
  19. // _LCD_print_bufforT ;
  20. } ;
  21. typedef struct _LCD_print_screenS _LCD_print_screensT;
  22. int b_ascii_value = character;
  23. /*
  24. struct record
  25. {
  26. int bookId;
  27. int qtyInStock;
  28. };
  29. typedef struct record Record;
  30. void sold(int id, Record* records) {
  31. int i;
  32. for(i=0;i<3;i++) {
  33. if(records[i].bookId == id) {
  34. records[i].qtyInStock--;
  35. }
  36. }
  37. }
  38. */
  39. /*
  40. void updateId(int id, int new_id, Record* records) {
  41. int i;
  42. for(i=0;i<3;i++) {
  43. if(records[i].bookId == id) {
  44. records[i].bookid = new_id;
  45. }
  46. }
  47. }
  48. */
  49. /*
  50. void updateQty(int id, int new_qty, Record* records) {
  51. int i;
  52. for(i=0;i<3;i++) {
  53. if(records[i].bookId == id) {
  54. records[i].qtyInStock = new_qty;
  55. }
  56. }
  57. }
  58. */
  59. }
  60. String make_str16(String str){
  61. for(int i = 0; i < (16 - str.length()); i++)
  62. str += ' ';
  63. return str;
  64. }