/* generated common source file - do not edit */
#include "common_data.h"
#define G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH   (4096 * RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE)
#define G_RAI_DATA_COLLECTOR0_CHANNELS  (0 + 1)
#define G_RAI_DATA_COLLECTOR0_VIRT_CHANNELS (1 + 1)

#if 0 > 0
uint8_t g_rai_data_collector0_snapshot_channel0_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 0 > 1
uint8_t g_rai_data_collector0_snapshot_channel1_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 0 > 2
uint8_t g_rai_data_collector0_snapshot_channel2_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 0 > 3
uint8_t g_rai_data_collector0_snapshot_channel3_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 0 > 4
uint8_t g_rai_data_collector0_snapshot_channel4_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 0 > 5
uint8_t g_rai_data_collector0_snapshot_channel5_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 0 > 6
uint8_t g_rai_data_collector0_snapshot_channel6_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 0 > 7
uint8_t g_rai_data_collector0_snapshot_channel7_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 1 > 0
int16_t g_rai_data_collector0_data_feed_channel0_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_INT16_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 1 > 1
uint8_t g_rai_data_collector0_data_feed_channel1_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 1 > 2
uint8_t g_rai_data_collector0_data_feed_channel2_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 1 > 3
uint8_t g_rai_data_collector0_data_feed_channel3_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 1 > 4
uint8_t g_rai_data_collector0_data_feed_channel4_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 1 > 5
uint8_t g_rai_data_collector0_data_feed_channel5_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 1 > 6
uint8_t g_rai_data_collector0_data_feed_channel6_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

#if 1 > 7
uint8_t g_rai_data_collector0_data_feed_channel7_frame_buffer[G_RAI_DATA_COLLECTOR0_PING_PONG_BUFFER_LENGTH] BSP_ALIGN_VARIABLE(RAI_DATA_COLLECTOR_PING_PONG_BUFFER_SIZE * ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 2 : 4));
#endif

rai_data_collector_frame_buffer_t g_rai_data_collector0_frame_buf[G_RAI_DATA_COLLECTOR0_CHANNELS] =
        {

#if 1 > 0
          { .p_buf = g_rai_data_collector0_data_feed_channel0_frame_buffer, .data_type =
                    RAI_DATA_COLLECTOR_DATA_TYPE_INT16_T, },
#endif
#if 1 > 1
    {
        .p_buf = g_rai_data_collector0_data_feed_channel1_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 1 > 2
    {
        .p_buf = g_rai_data_collector0_data_feed_channel2_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 1 > 3
    {
        .p_buf = g_rai_data_collector0_data_feed_channel3_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 1 > 4
    {
        .p_buf = g_rai_data_collector0_data_feed_channel4_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 1 > 5
    {
        .p_buf = g_rai_data_collector0_data_feed_channel5_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 1 > 6
    {
        .p_buf = g_rai_data_collector0_data_feed_channel6_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 1 > 7
    {
        .p_buf = g_rai_data_collector0_data_feed_channel7_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif

#if 0 > 0
    {
        .p_buf = g_rai_data_collector0_snapshot_channel0_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 0 > 1
    {
        .p_buf = g_rai_data_collector0_snapshot_channel1_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 0 > 2
    {
        .p_buf = g_rai_data_collector0_snapshot_channel2_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 0 > 3
    {
        .p_buf = g_rai_data_collector0_snapshot_channel3_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 0 > 4
    {
        .p_buf = g_rai_data_collector0_snapshot_channel4_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 0 > 5
    {
        .p_buf = g_rai_data_collector0_snapshot_channel5_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 0 > 6
    {
        .p_buf = g_rai_data_collector0_snapshot_channel6_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
#if 0 > 7
    {
        .p_buf = g_rai_data_collector0_snapshot_channel7_frame_buffer,
        .data_type = RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T,
    },
#endif
        };

#if 0 > 0
transfer_info_t g_rai_data_collector0_info[0] DTC_TRANSFER_INFO_ALIGNMENT =
{

#if 0 > 0
    {
        .transfer_settings_word_b.dest_addr_mode = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.src_addr_mode  = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.repeat_area    = TRANSFER_REPEAT_AREA_SOURCE,
        .transfer_settings_word_b.irq            = TRANSFER_IRQ_END,
        .transfer_settings_word_b.chain_mode = (0 == 1) ? TRANSFER_CHAIN_MODE_DISABLED : TRANSFER_CHAIN_MODE_EACH,
        .transfer_settings_word_b.mode       = TRANSFER_MODE_BLOCK,
        .p_src      = (void const *) NULL,
        .num_blocks = 1,
        .transfer_settings_word_b.size = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? (transfer_size_t)  ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T & RAI_DATA_COLLECTOR_DATA_TYPE_SIZE_MASK) >> 1) : TRANSFER_SIZE_4_BYTE,
        .length     = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 1 : (1 * 2),
        .p_dest     = g_rai_data_collector0_snapshot_channel0_frame_buffer,
    },
#endif

#if 0 > 1
    {
        .transfer_settings_word_b.dest_addr_mode = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.src_addr_mode  = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.repeat_area    = TRANSFER_REPEAT_AREA_SOURCE,
        .transfer_settings_word_b.irq            = TRANSFER_IRQ_END,
        .transfer_settings_word_b.chain_mode = (0 == 2) ? TRANSFER_CHAIN_MODE_DISABLED : TRANSFER_CHAIN_MODE_EACH,
        .transfer_settings_word_b.mode       = TRANSFER_MODE_BLOCK,
        .p_src      = (void const *) NULL,
        .num_blocks = 1,
        .transfer_settings_word_b.size = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? (transfer_size_t)  ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T & RAI_DATA_COLLECTOR_DATA_TYPE_SIZE_MASK) >> 1) : TRANSFER_SIZE_4_BYTE,
        .length     = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 1 : (1 * 2),
        .p_dest     = g_rai_data_collector0_snapshot_channel1_frame_buffer,
    },
#endif

#if 0 > 2
    {
        .transfer_settings_word_b.dest_addr_mode = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.src_addr_mode  = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.repeat_area    = TRANSFER_REPEAT_AREA_SOURCE,
        .transfer_settings_word_b.irq            = TRANSFER_IRQ_END,
        .transfer_settings_word_b.chain_mode = (0 == 3) ? TRANSFER_CHAIN_MODE_DISABLED : TRANSFER_CHAIN_MODE_EACH,
        .transfer_settings_word_b.mode       = TRANSFER_MODE_BLOCK,
        .p_src      = (void const *) NULL,
        .num_blocks = 1,
        .transfer_settings_word_b.size = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? (transfer_size_t)  ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T & RAI_DATA_COLLECTOR_DATA_TYPE_SIZE_MASK) >> 1) : TRANSFER_SIZE_4_BYTE,
        .length     = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 1 : (1 * 2),
        .p_dest     = g_rai_data_collector0_snapshot_channel2_frame_buffer,
    },
#endif

#if 0 > 3
    {
        .transfer_settings_word_b.dest_addr_mode = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.src_addr_mode  = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.repeat_area    = TRANSFER_REPEAT_AREA_SOURCE,
        .transfer_settings_word_b.irq            = TRANSFER_IRQ_END,
        .transfer_settings_word_b.chain_mode = (0 == 4) ? TRANSFER_CHAIN_MODE_DISABLED : TRANSFER_CHAIN_MODE_EACH,
        .transfer_settings_word_b.mode       = TRANSFER_MODE_BLOCK,
        .p_src      = (void const *) NULL,
        .num_blocks = 1,
        .transfer_settings_word_b.size = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? (transfer_size_t)  ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T & RAI_DATA_COLLECTOR_DATA_TYPE_SIZE_MASK) >> 1) : TRANSFER_SIZE_4_BYTE,
        .length     = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 1 : (1 * 2),
        .p_dest     = g_rai_data_collector0_snapshot_channel3_frame_buffer,
    },
#endif

#if 0 > 4
    {
        .transfer_settings_word_b.dest_addr_mode = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.src_addr_mode  = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.repeat_area    = TRANSFER_REPEAT_AREA_SOURCE,
        .transfer_settings_word_b.irq            = TRANSFER_IRQ_END,
        .transfer_settings_word_b.chain_mode = (0 == 5) ? TRANSFER_CHAIN_MODE_DISABLED : TRANSFER_CHAIN_MODE_EACH,
        .transfer_settings_word_b.mode       = TRANSFER_MODE_BLOCK,
        .p_src      = (void const *) NULL,
        .num_blocks = 1,
        .transfer_settings_word_b.size = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? (transfer_size_t)  ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T & RAI_DATA_COLLECTOR_DATA_TYPE_SIZE_MASK) >> 1) : TRANSFER_SIZE_4_BYTE,
        .length     = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 1 : (1 * 2),
        .p_dest     = g_rai_data_collector0_snapshot_channel4_frame_buffer,
    },
#endif

#if 0 > 5
    {
        .transfer_settings_word_b.dest_addr_mode = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.src_addr_mode  = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.repeat_area    = TRANSFER_REPEAT_AREA_SOURCE,
        .transfer_settings_word_b.irq            = TRANSFER_IRQ_END,
        .transfer_settings_word_b.chain_mode = (0 == 6) ? TRANSFER_CHAIN_MODE_DISABLED : TRANSFER_CHAIN_MODE_EACH,
        .transfer_settings_word_b.mode       = TRANSFER_MODE_BLOCK,
        .p_src      = (void const *) NULL,
        .num_blocks = 1,
        .transfer_settings_word_b.size = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? (transfer_size_t)  ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T & RAI_DATA_COLLECTOR_DATA_TYPE_SIZE_MASK) >> 1) : TRANSFER_SIZE_4_BYTE,
        .length     = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 1 : (1 * 2),
        .p_dest     = g_rai_data_collector0_snapshot_channel5_frame_buffer,
    },
#endif

#if 0 > 6
    {
        .transfer_settings_word_b.dest_addr_mode = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.src_addr_mode  = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.repeat_area    = TRANSFER_REPEAT_AREA_SOURCE,
        .transfer_settings_word_b.irq            = TRANSFER_IRQ_END,
        .transfer_settings_word_b.chain_mode = (0 == 7) ? TRANSFER_CHAIN_MODE_DISABLED : TRANSFER_CHAIN_MODE_EACH,
        .transfer_settings_word_b.mode       = TRANSFER_MODE_BLOCK,
        .p_src      = (void const *) NULL,
        .num_blocks = 1,
        .transfer_settings_word_b.size = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? (transfer_size_t)  ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T & RAI_DATA_COLLECTOR_DATA_TYPE_SIZE_MASK) >> 1) : TRANSFER_SIZE_4_BYTE,
        .length     = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 1 : (1 * 2),
        .p_dest     = g_rai_data_collector0_snapshot_channel6_frame_buffer,
    },
#endif

#if 0 > 7
    {
        .transfer_settings_word_b.dest_addr_mode = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.src_addr_mode  = TRANSFER_ADDR_MODE_INCREMENTED,
        .transfer_settings_word_b.repeat_area    = TRANSFER_REPEAT_AREA_SOURCE,
        .transfer_settings_word_b.irq            = TRANSFER_IRQ_END,
        .transfer_settings_word_b.chain_mode =  TRANSFER_CHAIN_MODE_DISABLED,
        .transfer_settings_word_b.mode       = TRANSFER_MODE_BLOCK,
        .p_src      = (void const *) NULL,
        .num_blocks = 1,
        .transfer_settings_word_b.size = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? (transfer_size_t)  ((RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T & RAI_DATA_COLLECTOR_DATA_TYPE_SIZE_MASK) >> 1) : TRANSFER_SIZE_4_BYTE,
        .length     = (RAI_DATA_COLLECTOR_DATA_TYPE_UINT8_T != RAI_DATA_COLLECTOR_DATA_TYPE_DOUBLE) ? 1 : (1 * 2),
        .p_dest     = g_rai_data_collector0_snapshot_channel7_frame_buffer,
    },
#endif
};
#endif

rai_data_collector_frame_buffer_handle_t g_rai_data_collector0_frame_buf_hnd[G_RAI_DATA_COLLECTOR0_VIRT_CHANNELS];

rai_data_collector_extended_cfg_t g_rai_data_collector0_extended_cfg =
{ .p_ping_pong_buf = g_rai_data_collector0_frame_buf, .p_ping_pong_buf_hnd = g_rai_data_collector0_frame_buf_hnd,
#if 0 > 0
    .p_transfer_info = g_rai_data_collector0_info,
#else
  .p_transfer_info = NULL,
#endif
        };

rai_data_collector_instance_ctrl_t g_rai_data_collector0_ctrl;

const rai_data_collector_snapshot_cfg_t g_rai_data_collector0_ss_cfg =
{ .channels = 0, .transfer_len = 1,
#define RA_NOT_DEFINED (1)
#if (RA_NOT_DEFINED == RA_NOT_DEFINED)
  .p_timer = NULL,
#else
    .p_timer = &RA_NOT_DEFINED,
    #endif
#if (RA_NOT_DEFINED == RA_NOT_DEFINED)
  .p_transfer = NULL,
#else
    .p_transfer = &RA_NOT_DEFINED,
    #endif
#undef RA_NOT_DEFINED
        };

const rai_data_collector_data_feed_cfg_t g_rai_data_collector0_df_cfg =
{ .channels = 1, };

const rai_data_collector_cfg_t g_rai_data_collector0_cfg =
{ .instance_id = 0, .channels = G_RAI_DATA_COLLECTOR0_CHANNELS, .channel_ready_mask = 1, .virt_channels =
          G_RAI_DATA_COLLECTOR0_VIRT_CHANNELS,
  .required_frame_len = 4096, .p_snapshot_cfg = &g_rai_data_collector0_ss_cfg, .p_data_feed_cfg =
          &g_rai_data_collector0_df_cfg,
  .p_extend = &g_rai_data_collector0_extended_cfg, .p_callback = rai_data_collector0_callback, .p_error_callback =
          rai_data_collector0_error_callback,
  /** If NULL then do not add & */
#if defined(NULL)
    .p_context = NULL,
#else
  .p_context = &NULL,
#endif
        };

/* Instance structure to use Data Collector module. */
const rai_data_collector_instance_t g_rai_data_collector0 =
{ .p_ctrl = &g_rai_data_collector0_ctrl, .p_cfg = &g_rai_data_collector0_cfg, .p_api = &g_dc_on_rai_data_collector, };
crc_instance_ctrl_t g_crc0_ctrl;
const crc_cfg_t g_crc0_cfg =
{ .polynomial = CRC_POLYNOMIAL_CRC_8, .bit_order = CRC_BIT_ORDER_LMS_MSB, .snoop_address = 0, .p_extend = NULL, };

/* Instance structure to use this module. */
const crc_instance_t g_crc0 =
{ .p_ctrl = &g_crc0_ctrl, .p_cfg = &g_crc0_cfg, .p_api = &g_crc_on_crc };
sci_uart_instance_ctrl_t g_uart0_ctrl;

baud_setting_t g_uart0_baud_setting =
        {
        /* Baud rate calculated with 0.469% error. */.semr_baudrate_bits_b.abcse = 1,
          .semr_baudrate_bits_b.abcs = 0, .semr_baudrate_bits_b.bgdm = 0, .cks = 0, .brr = 17, .mddr = (uint8_t) 256, .semr_baudrate_bits_b.brme =
                  false };

/** UART extended configuration for UARTonSCI HAL driver */
const sci_uart_extended_cfg_t g_uart0_cfg_extend =
{ .clock = SCI_UART_CLOCK_INT, .rx_edge_start = SCI_UART_START_BIT_FALLING_EDGE, .noise_cancel =
          SCI_UART_NOISE_CANCELLATION_DISABLE,
  .rx_fifo_trigger = SCI_UART_RX_FIFO_TRIGGER_MAX, .p_baud_setting = &g_uart0_baud_setting, .flow_control =
          SCI_UART_FLOW_CONTROL_RTS,
#if 0xFF != 0xFF
                .flow_control_pin       = BSP_IO_PORT_FF_PIN_0xFF,
                #else
  .flow_control_pin = (bsp_io_port_pin_t) UINT16_MAX,
#endif
  .rs485_setting =
  { .enable = SCI_UART_RS485_DISABLE, .polarity = SCI_UART_RS485_DE_POLARITY_HIGH,
#if 0xFF != 0xFF
                    .de_control_pin = BSP_IO_PORT_FF_PIN_0xFF,
                #else
    .de_control_pin = (bsp_io_port_pin_t) UINT16_MAX,
#endif
          },
  .irda_setting =
  { .ircr_bits_b.ire = 0, .ircr_bits_b.irrxinv = 0, .ircr_bits_b.irtxinv = 0, }, };

/** UART interface configuration */
const uart_cfg_t g_uart0_cfg =
{ .channel = 4, .data_bits = UART_DATA_BITS_8, .parity = UART_PARITY_OFF, .stop_bits = UART_STOP_BITS_1, .p_callback =
          NULL,
  .p_context = NULL, .p_extend = &g_uart0_cfg_extend,
#define RA_NOT_DEFINED (1)
#if (RA_NOT_DEFINED == RA_NOT_DEFINED)
  .p_transfer_tx = NULL,
#else
                .p_transfer_tx       = &RA_NOT_DEFINED,
#endif
#if (RA_NOT_DEFINED == RA_NOT_DEFINED)
  .p_transfer_rx = NULL,
#else
                .p_transfer_rx       = &RA_NOT_DEFINED,
#endif
#undef RA_NOT_DEFINED
  .rxi_ipl = (12),
  .txi_ipl = (12), .tei_ipl = (12), .eri_ipl = (12),
#if defined(VECTOR_NUMBER_SCI4_RXI)
                .rxi_irq             = VECTOR_NUMBER_SCI4_RXI,
#else
  .rxi_irq = FSP_INVALID_VECTOR,
#endif
#if defined(VECTOR_NUMBER_SCI4_TXI)
                .txi_irq             = VECTOR_NUMBER_SCI4_TXI,
#else
  .txi_irq = FSP_INVALID_VECTOR,
#endif
#if defined(VECTOR_NUMBER_SCI4_TEI)
                .tei_irq             = VECTOR_NUMBER_SCI4_TEI,
#else
  .tei_irq = FSP_INVALID_VECTOR,
#endif
#if defined(VECTOR_NUMBER_SCI4_ERI)
                .eri_irq             = VECTOR_NUMBER_SCI4_ERI,
#else
  .eri_irq = FSP_INVALID_VECTOR,
#endif
        };

/* Instance structure to use this module. */
const uart_instance_t g_uart0 =
{ .p_ctrl = &g_uart0_ctrl, .p_cfg = &g_uart0_cfg, .p_api = &g_uart_on_sci };
/* UART Communication Device */

rm_comms_uart_instance_ctrl_t g_comms_uart0_ctrl;

#if BSP_CFG_RTOS == 1 // ThreadX

 #if !defined(g_comms_uart0_tx_mutex)
 rm_comms_mutex_t g_comms_uart0_tx_mutex =
 {
     .p_name = "g_comms_uart0 tx mutex",
 };
 #endif

 #if !defined(g_comms_uart0_rx_mutex)
 rm_comms_mutex_t g_comms_uart0_rx_mutex =
 {
     .p_name = "g_comms_uart0 rx mutex",
 };
 #endif

 #if !defined(g_comms_uart0_tx_semaphore)
 rm_comms_semaphore_t g_comms_uart0_tx_semaphore =
 {
     .p_name = "g_comms_uart0 tx semaphore",
 };
 #endif

  #if !defined(g_comms_uart0_rx_semaphore)
 rm_comms_semaphore_t g_comms_uart0_rx_semaphore =
 {
     .p_name = "g_comms_uart0 rx semaphore",
 };
 #endif

#elif BSP_CFG_RTOS == 2 // FreeRTOS

#if !defined(g_comms_uart0_tx_mutex)
rm_comms_mutex_t g_comms_uart0_tx_mutex;
#endif

#if !defined(g_comms_uart0_rx_mutex)
rm_comms_mutex_t g_comms_uart0_rx_mutex;
#endif
#if !defined(g_comms_uart0_tx_semaphore)
rm_comms_semaphore_t g_comms_uart0_tx_semaphore;
#endif

#if !defined(g_comms_uart0_rx_semaphore)
rm_comms_semaphore_t g_comms_uart0_rx_semaphore;
#endif

#else

#endif

rm_comms_uart_extended_cfg_t g_comms_uart0_extended_cfg =
{
#if BSP_CFG_RTOS

#if !defined(g_comms_uart0_tx_mutex)
    .p_tx_mutex = &g_comms_uart0_tx_mutex,
#else
    .p_tx_mutex = NULL,
#endif

#if !defined(g_comms_uart0_rx_mutex)
    .p_rx_mutex = &g_comms_uart0_rx_mutex,
#else
    .p_rx_mutex = NULL,
#endif

#if !defined(g_comms_uart0_tx_semaphore)
    .p_tx_semaphore = &g_comms_uart0_tx_semaphore,
#else
    .p_tx_semaphore = NULL,
#endif

#if !defined(g_comms_uart0_rx_semaphore)
    .p_rx_semaphore = &g_comms_uart0_rx_semaphore,
#else
    .p_rx_semaphore = NULL,
#endif
    .mutex_timeout  = 0xFFFFFFFF,
#endif
  .p_uart = &g_uart0, };

const rm_comms_cfg_t g_comms_uart0_cfg =
{ .semaphore_timeout = 0xFFFFFFFF,
  .p_lower_level_cfg = NULL,
  .p_extend = (void*) &g_comms_uart0_extended_cfg,
  .p_callback = NULL, };

const rm_comms_instance_t g_comms_uart0 =
{ .p_ctrl = &g_comms_uart0_ctrl, .p_cfg = &g_comms_uart0_cfg, .p_api = &g_comms_on_comms_uart, };
const rai_data_shipper_cfg_t g_rai_data_shipper0_cfg =
{

#define RA_NOT_DEFINED 1
#if (RA_NOT_DEFINED == g_crc0)
    .p_crc = NULL,
#else
  .p_crc = &g_crc0,
#endif
#undef RA_NOT_DEFINED

  .p_comms = &g_comms_uart0,
  .divider = 0, .p_callback = rai_data_shipper0_callback,
  /* If NULL then do not add & */
#if defined(NULL)
    .p_context = NULL,
#else
  .p_context = &NULL,
#endif

        };

rai_data_shipper_instance_ctrl_t g_rai_data_shipper0_ctrl;

/* Instance structure to use Data Shipper module. */
const rai_data_shipper_instance_t g_rai_data_shipper0 =
{ .p_ctrl = &g_rai_data_shipper0_ctrl, .p_cfg = &g_rai_data_shipper0_cfg, .p_api = &g_ds_on_rai_data_shipper, };
elc_instance_ctrl_t g_elc_ctrl;

extern const elc_cfg_t g_elc_cfg;

const elc_instance_t g_elc =
{ .p_ctrl = &g_elc_ctrl, .p_api = &g_elc_on_elc, .p_cfg = &g_elc_cfg };
ioport_instance_ctrl_t g_ioport_ctrl;
const ioport_instance_t g_ioport =
{ .p_api = &g_ioport_on_ioport, .p_ctrl = &g_ioport_ctrl, .p_cfg = &g_bsp_pin_cfg, };
void g_common_init(void)
{
}
