Lines Matching refs:rx
139 struct ipaq_micro_rxdev *rx = µ->rx; in micro_process_char() local
141 switch (rx->state) { in micro_process_char()
144 rx->state = STATE_ID; /* Next byte is the id and len */ in micro_process_char()
147 rx->id = (ch & 0xf0) >> 4; in micro_process_char()
148 rx->len = (ch & 0x0f); in micro_process_char()
149 rx->index = 0; in micro_process_char()
150 rx->chksum = ch; in micro_process_char()
151 rx->state = (rx->len > 0) ? STATE_DATA : STATE_CHKSUM; in micro_process_char()
154 rx->chksum += ch; in micro_process_char()
155 rx->buf[rx->index] = ch; in micro_process_char()
156 if (++rx->index == rx->len) in micro_process_char()
157 rx->state = STATE_CHKSUM; in micro_process_char()
160 if (ch == rx->chksum) in micro_process_char()
161 micro_rx_msg(micro, rx->id, rx->len, rx->buf); in micro_process_char()
162 rx->state = STATE_SOF; in micro_process_char()
295 struct ipaq_micro_rxdev *rx = µ->rx; in micro_reset_comm() local
302 rx->state = STATE_SOF; /* Reset the state machine */ in micro_reset_comm()