Files
luban-lite/packages/artinchip/uds/UDSLogic/SID37_RequestTransferExit.c

52 lines
1.5 KiB
C
Raw Permalink Normal View History

2025-07-22 11:15:46 +08:00
/*
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include "SID37_RequestTransferExit.h"
#include "service_cfg.h"
#include "uds_def.h"
/******************************************************************************
* : bool_t service_37_check_len(const uint8_t* msg_buf, uint16_t msg_dlc)
* : 37
* : uint16_t msg_dlc --
* :
* : TRUE: ; FALSE:
* :
******************************************************************************/
2025-10-21 13:59:50 +08:00
bool_t service_37_check_len(const uint8_t *msg_buf, uint16_t msg_dlc)
2025-07-22 11:15:46 +08:00
{
2025-10-21 13:59:50 +08:00
bool_t ret = FALSE;
2025-07-22 11:15:46 +08:00
2025-10-21 13:59:50 +08:00
ret = TRUE;
2025-07-22 11:15:46 +08:00
2025-10-21 13:59:50 +08:00
return ret;
}
2025-07-22 11:15:46 +08:00
/******************************************************************************
* : void service_37_RequestTransferExit(const uint8_t* msg_buf, uint16_t msg_dlc)
* : 37 - 退
* : uint8_t* msg_buf --
    uint8_t msg_dlc --
* :
* :
* :
******************************************************************************/
2025-10-21 13:59:50 +08:00
void service_37_RequestTransferExit(const uint8_t *msg_buf, uint16_t msg_dlc)
2025-07-22 11:15:46 +08:00
{
2025-10-21 13:59:50 +08:00
uint8_t rsp_buf[8];
2025-07-22 11:15:46 +08:00
2025-10-21 13:59:50 +08:00
if (transfer_file != NULL) {
printf("Transfer exit requested. Closing file.\n");
fclose(transfer_file);
transfer_file = NULL;
}
2025-07-22 11:15:46 +08:00
2025-10-21 13:59:50 +08:00
rsp_buf[0] = USD_GET_POSITIVE_RSP(SID_37);
uds_positive_rsp(rsp_buf, 1);
}
2025-07-22 11:15:46 +08:00
/****************EOF****************/