/***********************************************************************************************************************
 * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file
 * will be overwritten if the respective MCUXpresso Config Tools is used to update this file.
 **********************************************************************************************************************/

#ifndef _PERIPHERALS_H_
#define _PERIPHERALS_H_

/***********************************************************************************************************************
 * Included files
 **********************************************************************************************************************/
#include "fsl_common.h"
#include "fsl_mcan.h"
#include "fsl_clock.h"
#include "fsl_adc.h"
#include "fsl_reset.h"
#include "fsl_usart.h"
#include "fsl_i2c.h"
#include "fsl_spi.h"

#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus */

/***********************************************************************************************************************
 * Definitions
 **********************************************************************************************************************/
/* Definitions for BOARD_InitPeripherals functional group */
/* Definition of peripheral ID */
#define CAN0_PERIPHERAL CAN0
/* Definition of the clock source frequency */
#define CAN0_CLOCK_SOURCE 60000000UL
/* Definition of the base address alignment */
#define CAN0_BASE_ADDRESS_ALIGN_SIZE (0x10000)
/* Definition of the message RAM size in words */
#define CAN0_MESSAGE_RAM_SIZE 9
/* Nominal baud rate value (calculated) */
#define CAN0_NOMINAL_BAUD_RATE_VALUE 535714
/* Mask of enabled TX buffer interrupts */
#define CAN0_TX_BUFFERS_IRQ_MASK 0
/* Definition of peripheral ID */
#define CAN1_PERIPHERAL CAN1
/* Definition of the clock source frequency */
#define CAN1_CLOCK_SOURCE 60000000UL
/* Definition of the base address alignment */
#define CAN1_BASE_ADDRESS_ALIGN_SIZE (0x10000)
/* Definition of the message RAM size in words */
#define CAN1_MESSAGE_RAM_SIZE 9
/* Nominal baud rate value (calculated) */
#define CAN1_NOMINAL_BAUD_RATE_VALUE 535714
/* Mask of enabled TX buffer interrupts */
#define CAN1_TX_BUFFERS_IRQ_MASK 0
/* Alias for ADC0 peripheral */
#define ADC0_PERIPHERAL ADC0
/* Definition of the clock source frequency. */
#define ADC0_CLK_FREQ 180000000UL
/* Definition of peripheral ID */
#define FLEXCOMM0_PERIPHERAL ((USART_Type *)FLEXCOMM0)
/* Definition of the clock source frequency */
#define FLEXCOMM0_CLOCK_SOURCE 12000000UL
/* BOARD_InitPeripherals defines for FLEXCOMM1 */
/* Definition of peripheral ID */
#define FLEXCOMM1_PERIPHERAL ((I2C_Type *)FLEXCOMM1)
/* Definition of the clock source frequency */
#define FLEXCOMM1_CLOCK_SOURCE 12000000UL
/* BOARD_InitPeripherals defines for FLEXCOMM2 */
/* Definition of peripheral ID */
#define FLEXCOMM2_PERIPHERAL ((SPI_Type *)FLEXCOMM2)
/* Definition of the clock source frequency */
#define FLEXCOMM2_CLOCK_SOURCE 48000000UL

/***********************************************************************************************************************
 * Global variables
 **********************************************************************************************************************/
extern const mcan_config_t CAN0_config;
extern uint32_t CAN0_RAM_BASE_ADDRESS[CAN0_MESSAGE_RAM_SIZE];
extern const mcan_frame_filter_config_t CAN0_std_filter_config;
extern const mcan_frame_filter_config_t CAN0_ext_filter_config;
extern const mcan_rx_fifo_config_t CAN0_rx_fifo0_config;
extern const mcan_rx_fifo_config_t CAN0_rx_fifo1_config;
extern const mcan_rx_buffer_config_t CAN0_rx_buffers_config;
extern const mcan_tx_fifo_config_t CAN0_tx_event_fifo_config;
extern const mcan_tx_buffer_config_t CAN0_tx_buffers_config;
extern const mcan_config_t CAN1_config;
extern uint32_t CAN1_RAM_BASE_ADDRESS[CAN1_MESSAGE_RAM_SIZE];
extern const mcan_frame_filter_config_t CAN1_std_filter_config;
extern const mcan_frame_filter_config_t CAN1_ext_filter_config;
extern const mcan_rx_fifo_config_t CAN1_rx_fifo0_config;
extern const mcan_rx_fifo_config_t CAN1_rx_fifo1_config;
extern const mcan_rx_buffer_config_t CAN1_rx_buffers_config;
extern const mcan_tx_fifo_config_t CAN1_tx_event_fifo_config;
extern const mcan_tx_buffer_config_t CAN1_tx_buffers_config;
extern const adc_config_t ADC0configStruct;
extern const usart_config_t FLEXCOMM0_config;
extern const i2c_master_config_t FLEXCOMM1_config;
extern const spi_master_config_t FLEXCOMM2_config;

/***********************************************************************************************************************
 * Initialization functions
 **********************************************************************************************************************/

void BOARD_InitPeripherals(void);

/***********************************************************************************************************************
 * BOARD_InitBootPeripherals function
 **********************************************************************************************************************/
void BOARD_InitBootPeripherals(void);

#if defined(__cplusplus)
}
#endif

#endif /* _PERIPHERALS_H_ */
