Lines Matching refs:code

146     enum rym_code code,  in _rym_send_packet()  argument
154 switch(code) in _rym_send_packet()
167 ctx->buf[0] = code; in _rym_send_packet()
183 static rt_ssize_t _rym_putchar(struct rym_ctx *ctx, rt_uint8_t code) in _rym_putchar() argument
185 rt_device_write(ctx->dev, 0, &code, sizeof(code)); in _rym_putchar()
204 enum rym_code code; in _rym_do_handshake() local
215 code = _rym_read_code(ctx, in _rym_do_handshake()
217 if (code == RYM_CODE_SOH) in _rym_do_handshake()
222 else if (code == RYM_CODE_STX) in _rym_do_handshake()
266 enum rym_code code; in _rym_do_send_handshake() local
278 code = _rym_read_code(ctx, in _rym_do_send_handshake()
280 if (code == RYM_CODE_C) in _rym_do_send_handshake()
294 code = RYM_CODE_SOH; in _rym_do_send_handshake()
295 _rym_send_packet(ctx, code, index); in _rym_do_send_handshake()
320 enum rym_code *code) in _rym_trans_data() argument
341 *code = RYM_CODE_NONE; in _rym_trans_data()
354 *code = ctx->on_data(ctx, ctx->buf + 3, data_sz); in _rym_trans_data()
356 *code = RYM_CODE_ACK; in _rym_trans_data()
370 enum rym_code code; in _rym_do_trans() local
373 code = _rym_read_code(ctx, in _rym_do_trans()
375 switch (code) in _rym_do_trans()
398 err = _rym_trans_data(ctx, data_sz, &code); in _rym_do_trans()
417 switch (code) in _rym_do_trans()
439 enum rym_code code; in _rym_do_send_trans() local
451 code = ctx->on_data(ctx, ctx->buf + 3, data_sz - 5); in _rym_do_send_trans()
453 _rym_send_packet(ctx, code, index); in _rym_do_send_trans()
472 enum rym_code code; in _rym_do_fin() local
484 code = _rym_read_code(ctx, RYM_WAIT_PKG_TICK); in _rym_do_fin()
485 if (code != RYM_CODE_EOT) in _rym_do_fin()
491 code = _rym_read_code(ctx, RYM_WAIT_PKG_TICK); in _rym_do_fin()
492 if (code == RYM_CODE_SOH) in _rym_do_fin()
496 else if (code == RYM_CODE_STX) in _rym_do_fin()
535 enum rym_code code; in _rym_do_send_fin() local
569 code = RYM_CODE_SOH; in _rym_do_send_fin()
571 _rym_send_packet(ctx, code, index); in _rym_do_send_fin()