/*!
 * @file        user_can_config.c
 *
 * @brief       CAN configurations
 *
 * @version     V1.0.0
 *
 * @date        2026-03-25
 *
 * @attention
 *
 *  Copyright (C) 2026 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (Geehy Semiconductor Software License Agreement).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the Geehy Semiconductor Software License Agreement for the governing permissions
 *  and limitations under the License.
 */

/* Includes */
#include "user_can_config.h"

/** @addtogroup Examples
  @{
  */

/** @addtogroup CAN_Examples
  @{
  */

/** @addtogroup CAN_FdFrames
  @{
*/

/** @defgroup CAN_FdFrames_INT_Variables INT_Variables
  @{
*/

/* Configurations for the CAN controller */
Can_ConfigType g_canConfig = {
    .arbBaudrate                        = 1000000U,
    .dataBaudrate                       = 4000000U,
    .canfdNorEn                         = ENABLE,
    .canfdBrsEn                         = ENABLE,
    .loopBackInterEn                    = DISABLE,
    .loopBackExtEn                      = DISABLE,
    .busMonEn                           = DISABLE,
    .baudrateConfig.clkPsc              = 0U,
    .baudrateConfig.phaseSeg1           = 0x31U,
    .baudrateConfig.phaseSeg2           = 0x0CU,
    .baudrateConfig.resyncJumpWidth     = 0x0CU,
    .baudrateConfig.dataClkPsc          = 0U,
    .baudrateConfig.dataPhaseSeg1       = 0x0BU,
    .baudrateConfig.dataPhaseSeg2       = 0x02U,
    .baudrateConfig.dataResyncJumpWidth = 0x02U,
};

/**@} end of group CAN_FdFrames_INT_Variables */
/**@} end of group CAN_FdFrames */
/**@} end of group CAN_Examples */
/**@} end of group Examples */
