/* Input : enable : 1 enable PING : 0 disable PING  */
int32_t ch395_ping_enable(uint8_t enable)
/* Input : enable : 1 enable PING : 0 disable PING  */
int32_t ch395_ping_enable(uint8_t enable)
{
    int32_t ret = 0;
    uint8_t cmd_data[2] = {0};
    if (enable != 0 && enable != 1) {
        LOGE(TAG, "Invalid inpute %d", enable);
        return -1;
    }
    cmd_data[0] = CMD01_PING_ENABLE;
    cmd_data[1] = enable;
    ret = ch395_spi_data_write(cmd_data, sizeof(cmd_data));
    if (ret) {
        LOGE(TAG, "Fail to send data 0x%x", enable);
        return -1;
    }
    return 0;
}