ThermalPrinter
ThermalPrinter.cpp@0:1c3e41cbdfa7, 2019-06-04 (annotated)
- Committer:
- williequesada
- Date:
- Tue Jun 04 16:03:54 2019 +0000
- Revision:
- 0:1c3e41cbdfa7
compartir a Pablo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
williequesada | 0:1c3e41cbdfa7 | 1 | #include "ThermalPrinter.h" |
williequesada | 0:1c3e41cbdfa7 | 2 | #include "mbed.h" |
williequesada | 0:1c3e41cbdfa7 | 3 | #include "stdio.h" |
williequesada | 0:1c3e41cbdfa7 | 4 | |
williequesada | 0:1c3e41cbdfa7 | 5 | const char HORIZONTAL_TAB=9; |
williequesada | 0:1c3e41cbdfa7 | 6 | const char NEXT_POSITION=10; |
williequesada | 0:1c3e41cbdfa7 | 7 | const char ESC=27; |
williequesada | 0:1c3e41cbdfa7 | 8 | const char SPECIAL_CHARACTER=82; |
williequesada | 0:1c3e41cbdfa7 | 9 | const char SPANISH=11; |
williequesada | 0:1c3e41cbdfa7 | 10 | const char U_TILDE=126; |
williequesada | 0:1c3e41cbdfa7 | 11 | const char A_TILDE=64; |
williequesada | 0:1c3e41cbdfa7 | 12 | const char INICIAR=64; |
williequesada | 0:1c3e41cbdfa7 | 13 | const char TAMANO=33; |
williequesada | 0:1c3e41cbdfa7 | 14 | const char LETRA_12X24_DOBLE=49; |
williequesada | 0:1c3e41cbdfa7 | 15 | const char LETRA_16X16_DOBLE=34; |
williequesada | 0:1c3e41cbdfa7 | 16 | const char XON=17;//0x11 |
williequesada | 0:1c3e41cbdfa7 | 17 | const char XOFF=19;//0x13 |
williequesada | 0:1c3e41cbdfa7 | 18 | const char POWER_DOWN=18; |
williequesada | 0:1c3e41cbdfa7 | 19 | const char GS=29; |
williequesada | 0:1c3e41cbdfa7 | 20 | const char CUTTING=86; |
williequesada | 0:1c3e41cbdfa7 | 21 | const char PARTIAL=49; |
williequesada | 0:1c3e41cbdfa7 | 22 | const char FULL=48; |
williequesada | 0:1c3e41cbdfa7 | 23 | |
williequesada | 0:1c3e41cbdfa7 | 24 | char ThermalPrinter_Buffer[255]; |
williequesada | 0:1c3e41cbdfa7 | 25 | int ThermalPrinter_Counter=0; |
williequesada | 0:1c3e41cbdfa7 | 26 | int Tiquete=0; |
williequesada | 0:1c3e41cbdfa7 | 27 | |
williequesada | 0:1c3e41cbdfa7 | 28 | PRINTER::PRINTER(PinName TX, PinName RX,PinName PAPER, PinName SELECT,PinName RESET,PinName POWER) : ThermalPrinter(TX,RX),_PAPER(PAPER),_SELECT(SELECT),_RESET(RESET),_POWER(POWER) |
williequesada | 0:1c3e41cbdfa7 | 29 | { |
williequesada | 0:1c3e41cbdfa7 | 30 | _PAPER=1; // AFT |
williequesada | 0:1c3e41cbdfa7 | 31 | _SELECT=1; // SLCTIN |
williequesada | 0:1c3e41cbdfa7 | 32 | _RESET=1; // INPRM |
williequesada | 0:1c3e41cbdfa7 | 33 | _POWER=0; // RELE |
williequesada | 0:1c3e41cbdfa7 | 34 | ThermalPrinter.attach(this,&PRINTER::ThermalPrinterInterruption); |
williequesada | 0:1c3e41cbdfa7 | 35 | } |
williequesada | 0:1c3e41cbdfa7 | 36 | |
williequesada | 0:1c3e41cbdfa7 | 37 | |
williequesada | 0:1c3e41cbdfa7 | 38 | void PRINTER::ThermalPrinterInterruption() |
williequesada | 0:1c3e41cbdfa7 | 39 | { |
williequesada | 0:1c3e41cbdfa7 | 40 | if(ThermalPrinter.readable()) { |
williequesada | 0:1c3e41cbdfa7 | 41 | ThermalPrinter_Buffer[ThermalPrinter_Counter]=ThermalPrinter.getc(); |
williequesada | 0:1c3e41cbdfa7 | 42 | ThermalPrinter_Counter++; |
williequesada | 0:1c3e41cbdfa7 | 43 | } |
williequesada | 0:1c3e41cbdfa7 | 44 | } |
williequesada | 0:1c3e41cbdfa7 | 45 | |
williequesada | 0:1c3e41cbdfa7 | 46 | uint8_t PRINTER::Reset() |
williequesada | 0:1c3e41cbdfa7 | 47 | { |
williequesada | 0:1c3e41cbdfa7 | 48 | ThermalPrinter_Counter=0; |
williequesada | 0:1c3e41cbdfa7 | 49 | _RESET = 1; |
williequesada | 0:1c3e41cbdfa7 | 50 | wait_ms(500); |
williequesada | 0:1c3e41cbdfa7 | 51 | _RESET = 0; |
williequesada | 0:1c3e41cbdfa7 | 52 | int Error=2; |
williequesada | 0:1c3e41cbdfa7 | 53 | wait_ms(1400); |
williequesada | 0:1c3e41cbdfa7 | 54 | int Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 55 | |
williequesada | 0:1c3e41cbdfa7 | 56 | while(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 57 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 58 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 59 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 60 | } |
williequesada | 0:1c3e41cbdfa7 | 61 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 62 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 63 | break; |
williequesada | 0:1c3e41cbdfa7 | 64 | } |
williequesada | 0:1c3e41cbdfa7 | 65 | } |
williequesada | 0:1c3e41cbdfa7 | 66 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 67 | } |
williequesada | 0:1c3e41cbdfa7 | 68 | |
williequesada | 0:1c3e41cbdfa7 | 69 | uint8_t PRINTER::Output(char Date[],char Hour_Start[],char Hour_Finish[],char Place[],char Time[],char Ticket[],char Money[]) |
williequesada | 0:1c3e41cbdfa7 | 70 | { |
williequesada | 0:1c3e41cbdfa7 | 71 | ThermalPrinter_Counter=0; |
williequesada | 0:1c3e41cbdfa7 | 72 | int Counter; |
williequesada | 0:1c3e41cbdfa7 | 73 | bool Error=1; |
williequesada | 0:1c3e41cbdfa7 | 74 | |
williequesada | 0:1c3e41cbdfa7 | 75 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 76 | ThermalPrinter.putc(ESC); |
williequesada | 0:1c3e41cbdfa7 | 77 | ThermalPrinter.putc(INICIAR); |
williequesada | 0:1c3e41cbdfa7 | 78 | wait_ms(15); |
williequesada | 0:1c3e41cbdfa7 | 79 | } |
williequesada | 0:1c3e41cbdfa7 | 80 | |
williequesada | 0:1c3e41cbdfa7 | 81 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 82 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 83 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 84 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 85 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 86 | } |
williequesada | 0:1c3e41cbdfa7 | 87 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 88 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 89 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 90 | } |
williequesada | 0:1c3e41cbdfa7 | 91 | } |
williequesada | 0:1c3e41cbdfa7 | 92 | |
williequesada | 0:1c3e41cbdfa7 | 93 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 94 | ThermalPrinter.putc(ESC); |
williequesada | 0:1c3e41cbdfa7 | 95 | ThermalPrinter.putc(TAMANO); |
williequesada | 0:1c3e41cbdfa7 | 96 | ThermalPrinter.putc(LETRA_12X24_DOBLE); |
williequesada | 0:1c3e41cbdfa7 | 97 | ThermalPrinter.printf(" Municipalidad"); |
williequesada | 0:1c3e41cbdfa7 | 98 | wait_ms(200); |
williequesada | 0:1c3e41cbdfa7 | 99 | } |
williequesada | 0:1c3e41cbdfa7 | 100 | |
williequesada | 0:1c3e41cbdfa7 | 101 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 102 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 103 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 104 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 105 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 106 | } |
williequesada | 0:1c3e41cbdfa7 | 107 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 108 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 109 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 110 | } |
williequesada | 0:1c3e41cbdfa7 | 111 | } |
williequesada | 0:1c3e41cbdfa7 | 112 | |
williequesada | 0:1c3e41cbdfa7 | 113 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 114 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 115 | ThermalPrinter.printf(" de San Jose"); |
williequesada | 0:1c3e41cbdfa7 | 116 | wait_ms(400); |
williequesada | 0:1c3e41cbdfa7 | 117 | } |
williequesada | 0:1c3e41cbdfa7 | 118 | |
williequesada | 0:1c3e41cbdfa7 | 119 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 120 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 121 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 122 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 123 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 124 | } |
williequesada | 0:1c3e41cbdfa7 | 125 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 126 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 127 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 128 | } |
williequesada | 0:1c3e41cbdfa7 | 129 | } |
williequesada | 0:1c3e41cbdfa7 | 130 | |
williequesada | 0:1c3e41cbdfa7 | 131 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 132 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 133 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 134 | ThermalPrinter.printf("Setex Costa Rica"); |
williequesada | 0:1c3e41cbdfa7 | 135 | wait_ms(200); |
williequesada | 0:1c3e41cbdfa7 | 136 | } |
williequesada | 0:1c3e41cbdfa7 | 137 | |
williequesada | 0:1c3e41cbdfa7 | 138 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 139 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 140 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 141 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 142 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 143 | } |
williequesada | 0:1c3e41cbdfa7 | 144 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 145 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 146 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 147 | } |
williequesada | 0:1c3e41cbdfa7 | 148 | } |
williequesada | 0:1c3e41cbdfa7 | 149 | |
williequesada | 0:1c3e41cbdfa7 | 150 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 151 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 152 | ThermalPrinter.printf("- - - - - - - -"); |
williequesada | 0:1c3e41cbdfa7 | 153 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 154 | wait_ms(200); |
williequesada | 0:1c3e41cbdfa7 | 155 | } |
williequesada | 0:1c3e41cbdfa7 | 156 | |
williequesada | 0:1c3e41cbdfa7 | 157 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 158 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 159 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 160 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 161 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 162 | } |
williequesada | 0:1c3e41cbdfa7 | 163 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 164 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 165 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 166 | } |
williequesada | 0:1c3e41cbdfa7 | 167 | } |
williequesada | 0:1c3e41cbdfa7 | 168 | |
williequesada | 0:1c3e41cbdfa7 | 169 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 170 | ThermalPrinter.putc(ESC); |
williequesada | 0:1c3e41cbdfa7 | 171 | ThermalPrinter.putc(TAMANO); |
williequesada | 0:1c3e41cbdfa7 | 172 | ThermalPrinter.putc(LETRA_16X16_DOBLE); |
williequesada | 0:1c3e41cbdfa7 | 173 | ThermalPrinter.printf("Fin de estacionamiento:"); |
williequesada | 0:1c3e41cbdfa7 | 174 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 175 | wait_ms(100); |
williequesada | 0:1c3e41cbdfa7 | 176 | ThermalPrinter.putc(HORIZONTAL_TAB); |
williequesada | 0:1c3e41cbdfa7 | 177 | ThermalPrinter.putc(ESC); |
williequesada | 0:1c3e41cbdfa7 | 178 | ThermalPrinter.putc(TAMANO); |
williequesada | 0:1c3e41cbdfa7 | 179 | ThermalPrinter.putc(LETRA_12X24_DOBLE); |
williequesada | 0:1c3e41cbdfa7 | 180 | ThermalPrinter.printf(" %s",Hour_Finish); |
williequesada | 0:1c3e41cbdfa7 | 181 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 182 | wait_ms(200); |
williequesada | 0:1c3e41cbdfa7 | 183 | } |
williequesada | 0:1c3e41cbdfa7 | 184 | |
williequesada | 0:1c3e41cbdfa7 | 185 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 186 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 187 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 188 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 189 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 190 | } |
williequesada | 0:1c3e41cbdfa7 | 191 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 192 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 193 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 194 | } |
williequesada | 0:1c3e41cbdfa7 | 195 | } |
williequesada | 0:1c3e41cbdfa7 | 196 | |
williequesada | 0:1c3e41cbdfa7 | 197 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 198 | ThermalPrinter.putc(ESC); |
williequesada | 0:1c3e41cbdfa7 | 199 | ThermalPrinter.putc(TAMANO); |
williequesada | 0:1c3e41cbdfa7 | 200 | ThermalPrinter.putc(LETRA_16X16_DOBLE); |
williequesada | 0:1c3e41cbdfa7 | 201 | |
williequesada | 0:1c3e41cbdfa7 | 202 | ThermalPrinter.printf("N"); |
williequesada | 0:1c3e41cbdfa7 | 203 | ThermalPrinter.putc(ESC); |
williequesada | 0:1c3e41cbdfa7 | 204 | ThermalPrinter.putc(SPECIAL_CHARACTER); |
williequesada | 0:1c3e41cbdfa7 | 205 | ThermalPrinter.putc(SPANISH); |
williequesada | 0:1c3e41cbdfa7 | 206 | ThermalPrinter.putc(U_TILDE); |
williequesada | 0:1c3e41cbdfa7 | 207 | ThermalPrinter.printf("mero ticket:"); |
williequesada | 0:1c3e41cbdfa7 | 208 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 209 | wait_ms(50); |
williequesada | 0:1c3e41cbdfa7 | 210 | } |
williequesada | 0:1c3e41cbdfa7 | 211 | |
williequesada | 0:1c3e41cbdfa7 | 212 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 213 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 214 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 215 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 216 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 217 | } |
williequesada | 0:1c3e41cbdfa7 | 218 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 219 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 220 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 221 | } |
williequesada | 0:1c3e41cbdfa7 | 222 | } |
williequesada | 0:1c3e41cbdfa7 | 223 | |
williequesada | 0:1c3e41cbdfa7 | 224 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 225 | ThermalPrinter.printf(" "); |
williequesada | 0:1c3e41cbdfa7 | 226 | ThermalPrinter.printf("%s",Ticket); |
williequesada | 0:1c3e41cbdfa7 | 227 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 228 | Tiquete=Tiquete+1; |
williequesada | 0:1c3e41cbdfa7 | 229 | wait_ms(150); |
williequesada | 0:1c3e41cbdfa7 | 230 | } |
williequesada | 0:1c3e41cbdfa7 | 231 | |
williequesada | 0:1c3e41cbdfa7 | 232 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 233 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 234 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 235 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 236 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 237 | } |
williequesada | 0:1c3e41cbdfa7 | 238 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 239 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 240 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 241 | } |
williequesada | 0:1c3e41cbdfa7 | 242 | } |
williequesada | 0:1c3e41cbdfa7 | 243 | |
williequesada | 0:1c3e41cbdfa7 | 244 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 245 | ThermalPrinter.printf("Espacio:"); |
williequesada | 0:1c3e41cbdfa7 | 246 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 247 | wait_ms(50); |
williequesada | 0:1c3e41cbdfa7 | 248 | } |
williequesada | 0:1c3e41cbdfa7 | 249 | |
williequesada | 0:1c3e41cbdfa7 | 250 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 251 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 252 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 253 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 254 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 255 | } |
williequesada | 0:1c3e41cbdfa7 | 256 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 257 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 258 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 259 | } |
williequesada | 0:1c3e41cbdfa7 | 260 | } |
williequesada | 0:1c3e41cbdfa7 | 261 | |
williequesada | 0:1c3e41cbdfa7 | 262 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 263 | ThermalPrinter.printf(" %s",Place); |
williequesada | 0:1c3e41cbdfa7 | 264 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 265 | wait_ms(150); |
williequesada | 0:1c3e41cbdfa7 | 266 | } |
williequesada | 0:1c3e41cbdfa7 | 267 | |
williequesada | 0:1c3e41cbdfa7 | 268 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 269 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 270 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 271 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 272 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 273 | } |
williequesada | 0:1c3e41cbdfa7 | 274 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 275 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 276 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 277 | } |
williequesada | 0:1c3e41cbdfa7 | 278 | } |
williequesada | 0:1c3e41cbdfa7 | 279 | |
williequesada | 0:1c3e41cbdfa7 | 280 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 281 | ThermalPrinter.printf("Importe:"); |
williequesada | 0:1c3e41cbdfa7 | 282 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 283 | ThermalPrinter.printf(" %s",Money); |
williequesada | 0:1c3e41cbdfa7 | 284 | ThermalPrinter.printf(" CRC"); |
williequesada | 0:1c3e41cbdfa7 | 285 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 286 | wait_ms(200); |
williequesada | 0:1c3e41cbdfa7 | 287 | } |
williequesada | 0:1c3e41cbdfa7 | 288 | |
williequesada | 0:1c3e41cbdfa7 | 289 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 290 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 291 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 292 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 293 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 294 | } |
williequesada | 0:1c3e41cbdfa7 | 295 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 296 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 297 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 298 | } |
williequesada | 0:1c3e41cbdfa7 | 299 | } |
williequesada | 0:1c3e41cbdfa7 | 300 | |
williequesada | 0:1c3e41cbdfa7 | 301 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 302 | ThermalPrinter.printf("Tiempo pagado:"); |
williequesada | 0:1c3e41cbdfa7 | 303 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 304 | ThermalPrinter.printf(" %s",Time); |
williequesada | 0:1c3e41cbdfa7 | 305 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 306 | wait_ms(200); |
williequesada | 0:1c3e41cbdfa7 | 307 | } |
williequesada | 0:1c3e41cbdfa7 | 308 | |
williequesada | 0:1c3e41cbdfa7 | 309 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 310 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 311 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 312 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 313 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 314 | } |
williequesada | 0:1c3e41cbdfa7 | 315 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 316 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 317 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 318 | } |
williequesada | 0:1c3e41cbdfa7 | 319 | } |
williequesada | 0:1c3e41cbdfa7 | 320 | |
williequesada | 0:1c3e41cbdfa7 | 321 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 322 | ThermalPrinter.printf("Hora y fecha de pago:"); |
williequesada | 0:1c3e41cbdfa7 | 323 | wait_ms(200); |
williequesada | 0:1c3e41cbdfa7 | 324 | } |
williequesada | 0:1c3e41cbdfa7 | 325 | |
williequesada | 0:1c3e41cbdfa7 | 326 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 327 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 328 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 329 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 330 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 331 | } |
williequesada | 0:1c3e41cbdfa7 | 332 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 333 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 334 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 335 | } |
williequesada | 0:1c3e41cbdfa7 | 336 | } |
williequesada | 0:1c3e41cbdfa7 | 337 | |
williequesada | 0:1c3e41cbdfa7 | 338 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 339 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 340 | ThermalPrinter.printf(" %s",Hour_Start); |
williequesada | 0:1c3e41cbdfa7 | 341 | ThermalPrinter.putc(HORIZONTAL_TAB); |
williequesada | 0:1c3e41cbdfa7 | 342 | ThermalPrinter.printf("%s",Date); |
williequesada | 0:1c3e41cbdfa7 | 343 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 344 | wait_ms(200); |
williequesada | 0:1c3e41cbdfa7 | 345 | } |
williequesada | 0:1c3e41cbdfa7 | 346 | |
williequesada | 0:1c3e41cbdfa7 | 347 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 348 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 349 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 350 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 351 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 352 | } |
williequesada | 0:1c3e41cbdfa7 | 353 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 354 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 355 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 356 | } |
williequesada | 0:1c3e41cbdfa7 | 357 | } |
williequesada | 0:1c3e41cbdfa7 | 358 | |
williequesada | 0:1c3e41cbdfa7 | 359 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 360 | ThermalPrinter.putc(ESC); |
williequesada | 0:1c3e41cbdfa7 | 361 | ThermalPrinter.putc(TAMANO); |
williequesada | 0:1c3e41cbdfa7 | 362 | ThermalPrinter.putc(LETRA_12X24_DOBLE); |
williequesada | 0:1c3e41cbdfa7 | 363 | ThermalPrinter.printf("- - - - - - - -"); |
williequesada | 0:1c3e41cbdfa7 | 364 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 365 | ThermalPrinter.printf("Pague su parqueo"); |
williequesada | 0:1c3e41cbdfa7 | 366 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 367 | ThermalPrinter.printf(" con el APP"); |
williequesada | 0:1c3e41cbdfa7 | 368 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 369 | wait_ms(250); |
williequesada | 0:1c3e41cbdfa7 | 370 | } |
williequesada | 0:1c3e41cbdfa7 | 371 | |
williequesada | 0:1c3e41cbdfa7 | 372 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 373 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 374 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 375 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 376 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 377 | } |
williequesada | 0:1c3e41cbdfa7 | 378 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 379 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 380 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 381 | } |
williequesada | 0:1c3e41cbdfa7 | 382 | } |
williequesada | 0:1c3e41cbdfa7 | 383 | |
williequesada | 0:1c3e41cbdfa7 | 384 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 385 | ThermalPrinter.printf(" epark CR"); |
williequesada | 0:1c3e41cbdfa7 | 386 | ThermalPrinter.putc(NEXT_POSITION); |
williequesada | 0:1c3e41cbdfa7 | 387 | wait_ms(200); |
williequesada | 0:1c3e41cbdfa7 | 388 | } |
williequesada | 0:1c3e41cbdfa7 | 389 | |
williequesada | 0:1c3e41cbdfa7 | 390 | Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 391 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 392 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 393 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 394 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 395 | } |
williequesada | 0:1c3e41cbdfa7 | 396 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 397 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 398 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 399 | } |
williequesada | 0:1c3e41cbdfa7 | 400 | } |
williequesada | 0:1c3e41cbdfa7 | 401 | |
williequesada | 0:1c3e41cbdfa7 | 402 | |
williequesada | 0:1c3e41cbdfa7 | 403 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 404 | } |
williequesada | 0:1c3e41cbdfa7 | 405 | |
williequesada | 0:1c3e41cbdfa7 | 406 | uint8_t PRINTER::Cutter(bool Type) |
williequesada | 0:1c3e41cbdfa7 | 407 | { |
williequesada | 0:1c3e41cbdfa7 | 408 | ThermalPrinter_Counter=0; |
williequesada | 0:1c3e41cbdfa7 | 409 | |
williequesada | 0:1c3e41cbdfa7 | 410 | if(Type==1) { |
williequesada | 0:1c3e41cbdfa7 | 411 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 412 | ThermalPrinter.putc(GS); |
williequesada | 0:1c3e41cbdfa7 | 413 | ThermalPrinter.putc(CUTTING); |
williequesada | 0:1c3e41cbdfa7 | 414 | ThermalPrinter.putc(FULL); |
williequesada | 0:1c3e41cbdfa7 | 415 | wait_ms(2000); |
williequesada | 0:1c3e41cbdfa7 | 416 | } |
williequesada | 0:1c3e41cbdfa7 | 417 | } |
williequesada | 0:1c3e41cbdfa7 | 418 | if(Type==0) { |
williequesada | 0:1c3e41cbdfa7 | 419 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 420 | ThermalPrinter.putc(GS); |
williequesada | 0:1c3e41cbdfa7 | 421 | ThermalPrinter.putc(CUTTING); |
williequesada | 0:1c3e41cbdfa7 | 422 | ThermalPrinter.putc(PARTIAL); |
williequesada | 0:1c3e41cbdfa7 | 423 | wait_ms(2000); |
williequesada | 0:1c3e41cbdfa7 | 424 | } |
williequesada | 0:1c3e41cbdfa7 | 425 | } |
williequesada | 0:1c3e41cbdfa7 | 426 | |
williequesada | 0:1c3e41cbdfa7 | 427 | int Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 428 | bool Error=1; |
williequesada | 0:1c3e41cbdfa7 | 429 | |
williequesada | 0:1c3e41cbdfa7 | 430 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 431 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 432 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 433 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 434 | } |
williequesada | 0:1c3e41cbdfa7 | 435 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 436 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 437 | } |
williequesada | 0:1c3e41cbdfa7 | 438 | } |
williequesada | 0:1c3e41cbdfa7 | 439 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 440 | }; |
williequesada | 0:1c3e41cbdfa7 | 441 | |
williequesada | 0:1c3e41cbdfa7 | 442 | uint8_t PRINTER::Power(bool Turn) |
williequesada | 0:1c3e41cbdfa7 | 443 | { |
williequesada | 0:1c3e41cbdfa7 | 444 | ThermalPrinter_Counter=0; |
williequesada | 0:1c3e41cbdfa7 | 445 | if (Turn==1) { |
williequesada | 0:1c3e41cbdfa7 | 446 | _PAPER=0; // AFT |
williequesada | 0:1c3e41cbdfa7 | 447 | _SELECT=0; // SLCTIN |
williequesada | 0:1c3e41cbdfa7 | 448 | _RESET=0; |
williequesada | 0:1c3e41cbdfa7 | 449 | _POWER=1; |
williequesada | 0:1c3e41cbdfa7 | 450 | } else { |
williequesada | 0:1c3e41cbdfa7 | 451 | _PAPER=1; // AFT |
williequesada | 0:1c3e41cbdfa7 | 452 | _SELECT=1; // SLCTIN |
williequesada | 0:1c3e41cbdfa7 | 453 | _RESET=1; |
williequesada | 0:1c3e41cbdfa7 | 454 | _POWER=0; |
williequesada | 0:1c3e41cbdfa7 | 455 | } |
williequesada | 0:1c3e41cbdfa7 | 456 | wait_ms(1500); |
williequesada | 0:1c3e41cbdfa7 | 457 | |
williequesada | 0:1c3e41cbdfa7 | 458 | bool Error=1; |
williequesada | 0:1c3e41cbdfa7 | 459 | int Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 460 | |
williequesada | 0:1c3e41cbdfa7 | 461 | while(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 462 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 463 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 464 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 465 | } |
williequesada | 0:1c3e41cbdfa7 | 466 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 467 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 468 | break; |
williequesada | 0:1c3e41cbdfa7 | 469 | } |
williequesada | 0:1c3e41cbdfa7 | 470 | } |
williequesada | 0:1c3e41cbdfa7 | 471 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 472 | } |
williequesada | 0:1c3e41cbdfa7 | 473 | |
williequesada | 0:1c3e41cbdfa7 | 474 | |
williequesada | 0:1c3e41cbdfa7 | 475 | void PRINTER::PowerMax(bool Turn) |
williequesada | 0:1c3e41cbdfa7 | 476 | { |
williequesada | 0:1c3e41cbdfa7 | 477 | if (Turn==1) { |
williequesada | 0:1c3e41cbdfa7 | 478 | _PAPER=0; // AFT |
williequesada | 0:1c3e41cbdfa7 | 479 | _SELECT=0; // SLCTIN |
williequesada | 0:1c3e41cbdfa7 | 480 | _RESET=0; |
williequesada | 0:1c3e41cbdfa7 | 481 | } else { |
williequesada | 0:1c3e41cbdfa7 | 482 | _PAPER=1; // AFT |
williequesada | 0:1c3e41cbdfa7 | 483 | _SELECT=1; // SLCTIN |
williequesada | 0:1c3e41cbdfa7 | 484 | _RESET=1; |
williequesada | 0:1c3e41cbdfa7 | 485 | } |
williequesada | 0:1c3e41cbdfa7 | 486 | } |
williequesada | 0:1c3e41cbdfa7 | 487 | |
williequesada | 0:1c3e41cbdfa7 | 488 | |
williequesada | 0:1c3e41cbdfa7 | 489 | uint8_t PRINTER::Paper(uint32_t Duration) |
williequesada | 0:1c3e41cbdfa7 | 490 | { |
williequesada | 0:1c3e41cbdfa7 | 491 | ThermalPrinter_Counter=0; |
williequesada | 0:1c3e41cbdfa7 | 492 | _PAPER=1; |
williequesada | 0:1c3e41cbdfa7 | 493 | wait_ms(Duration); |
williequesada | 0:1c3e41cbdfa7 | 494 | _PAPER=0; |
williequesada | 0:1c3e41cbdfa7 | 495 | wait_ms(500); |
williequesada | 0:1c3e41cbdfa7 | 496 | |
williequesada | 0:1c3e41cbdfa7 | 497 | bool Error=1; |
williequesada | 0:1c3e41cbdfa7 | 498 | int Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 499 | |
williequesada | 0:1c3e41cbdfa7 | 500 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 501 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 502 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 503 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 504 | } |
williequesada | 0:1c3e41cbdfa7 | 505 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 506 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 507 | } |
williequesada | 0:1c3e41cbdfa7 | 508 | } |
williequesada | 0:1c3e41cbdfa7 | 509 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 510 | }; |
williequesada | 0:1c3e41cbdfa7 | 511 | |
williequesada | 0:1c3e41cbdfa7 | 512 | uint8_t PRINTER::End() |
williequesada | 0:1c3e41cbdfa7 | 513 | { |
williequesada | 0:1c3e41cbdfa7 | 514 | ThermalPrinter_Counter=0; |
williequesada | 0:1c3e41cbdfa7 | 515 | if(ThermalPrinter.writeable()) { |
williequesada | 0:1c3e41cbdfa7 | 516 | ThermalPrinter.putc(POWER_DOWN); |
williequesada | 0:1c3e41cbdfa7 | 517 | } |
williequesada | 0:1c3e41cbdfa7 | 518 | |
williequesada | 0:1c3e41cbdfa7 | 519 | wait(1); |
williequesada | 0:1c3e41cbdfa7 | 520 | bool Error=0; |
williequesada | 0:1c3e41cbdfa7 | 521 | int Counter = ThermalPrinter_Counter; |
williequesada | 0:1c3e41cbdfa7 | 522 | |
williequesada | 0:1c3e41cbdfa7 | 523 | if(Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 524 | Counter--; |
williequesada | 0:1c3e41cbdfa7 | 525 | if(ThermalPrinter_Buffer[Counter]==XON) { |
williequesada | 0:1c3e41cbdfa7 | 526 | Error=0; |
williequesada | 0:1c3e41cbdfa7 | 527 | } |
williequesada | 0:1c3e41cbdfa7 | 528 | if(ThermalPrinter_Buffer[Counter]==XOFF) { |
williequesada | 0:1c3e41cbdfa7 | 529 | Error=1; |
williequesada | 0:1c3e41cbdfa7 | 530 | } |
williequesada | 0:1c3e41cbdfa7 | 531 | } |
williequesada | 0:1c3e41cbdfa7 | 532 | return Error; |
williequesada | 0:1c3e41cbdfa7 | 533 | }; |
williequesada | 0:1c3e41cbdfa7 | 534 | |
williequesada | 0:1c3e41cbdfa7 | 535 | uint8_t PRINTER::Ticket(bool Instruction) |
williequesada | 0:1c3e41cbdfa7 | 536 | { |
williequesada | 0:1c3e41cbdfa7 | 537 | if (Instruction==0) { |
williequesada | 0:1c3e41cbdfa7 | 538 | Tiquete=0; |
williequesada | 0:1c3e41cbdfa7 | 539 | return 0; |
williequesada | 0:1c3e41cbdfa7 | 540 | } else { |
williequesada | 0:1c3e41cbdfa7 | 541 | return Tiquete; |
williequesada | 0:1c3e41cbdfa7 | 542 | } |
williequesada | 0:1c3e41cbdfa7 | 543 | }; |
williequesada | 0:1c3e41cbdfa7 | 544 | |
williequesada | 0:1c3e41cbdfa7 | 545 | char PRINTER::Entrada() |
williequesada | 0:1c3e41cbdfa7 | 546 | { |
williequesada | 0:1c3e41cbdfa7 | 547 | if(ThermalPrinter_Counter>0){ |
williequesada | 0:1c3e41cbdfa7 | 548 | ThermalPrinter_Counter--; |
williequesada | 0:1c3e41cbdfa7 | 549 | return ThermalPrinter_Buffer[ThermalPrinter_Counter]; |
williequesada | 0:1c3e41cbdfa7 | 550 | } else { |
williequesada | 0:1c3e41cbdfa7 | 551 | return 0x00; |
williequesada | 0:1c3e41cbdfa7 | 552 | } |
williequesada | 0:1c3e41cbdfa7 | 553 | }; |