Lines Matching refs:blk
28 static void add_crc16(uint8_t * blk, int len) in add_crc16() argument
67 crc = crctab[(crc >> 8) ^ *blk++] ^ crc << 8; in add_crc16()
69 *blk++ = crc >> 8; in add_crc16()
70 *blk = crc; in add_crc16()
73 static void send_ack(struct ymodem_state *ym, const uint8_t *blk,
76 static void send_ack_blk(struct ymodem_state *ym, uint8_t *blk) in send_ack_blk() argument
80 blk[0] = STX; in send_ack_blk()
81 blk[1] = ym->seq++; in send_ack_blk()
82 blk[2] = ~blk[1]; in send_ack_blk()
83 add_crc16(blk+3, 1024); in send_ack_blk()
85 send_ack(ym, blk, 1024+5); in send_ack_blk()
88 static void send_ack(struct ymodem_state *ym, const uint8_t *blk, size_t bytes) in send_ack() argument
93 serial_write(&ym->serial, blk, bytes); in send_ack()