| 461 | } |
| 462 | |
| 463 | static void _long_handle_first(struct rt_link_frame *receive_frame) |
| 464 | { |
| 465 | if (receive_frame->extend.parameter % RT_LINK_MAX_DATA_LENGTH == 0) |
| 466 | { |
| 467 | receive_frame->total = receive_frame->extend.parameter / RT_LINK_MAX_DATA_LENGTH; |
| 468 | } |
| 469 | else |
| 470 | { |
| 471 | receive_frame->total = receive_frame->extend.parameter / RT_LINK_MAX_DATA_LENGTH + 1; |
| 472 | } |
| 473 | |
| 474 | rt_link_scb->rx_record.total = receive_frame->total; |
| 475 | rt_link_scb->rx_record.dataspace = rt_malloc(receive_frame->extend.parameter); |
| 476 | if (rt_link_scb->rx_record.dataspace == RT_NULL) |
| 477 | { |
| 478 | LOG_W("long data (%dB) alloc failed.", receive_frame->extend.parameter); |
| 479 | } |
| 480 | } |
| 481 | |
| 482 | static void _long_handle_second(struct rt_link_frame *receive_frame) |
| 483 | { |
no test coverage detected