Project

General

Profile

Revision 273

Added by Kevin Woo almost 14 years ago

Pass information back and forth between read_card

View differences:

main.c
154 154

  
155 155
int main(void) {
156 156
    uint8_t mbuf[PROGD_PACKET_SIZE];
157
    uint8_t cbuf[100];
158
    uint8_t clen;
157 159
    uint8_t resp;
158 160
    uint8_t  c;
159 161
    uint8_t len;
......
175 177
            read_card = 1;
176 178
            if (cr_flag != CR_NONE) {
177 179
                read_card = 0;
178
                if (parse_card() < 0) {
180
                if (parse_card(cbuf, &clen) < 0) {
179 181
                    rs485_send_byte('F');
182
                } else {
183
                    for (c = 0; c < clen; c++) {
184
                        rs485_send_byte(cbuf[c]);
185
                    }
180 186
                }
181 187
                cr_flag = CR_NONE;
182 188
            }

Also available in: Unified diff