114 lines
4.5 KiB
C
114 lines
4.5 KiB
C
/***********************************************************************************************************************
|
|
* 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.
|
|
**********************************************************************************************************************/
|
|
|
|
/* clang-format off */
|
|
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
|
|
!!GlobalInfo
|
|
product: Peripherals v9.0
|
|
processor: MIMXRT1052xxxxB
|
|
package_id: MIMXRT1052DVL6B
|
|
mcu_data: ksdk2_0
|
|
processor_version: 9.0.0
|
|
board: IMXRT1050-EVKB
|
|
functionalGroups:
|
|
- name: BOARD_InitPeripherals
|
|
UUID: c02f2a7b-0e89-43b6-9488-2b4f58340ab8
|
|
called_from_default_init: true
|
|
selectedCore: core0
|
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
|
|
|
|
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
|
|
component:
|
|
- type: 'system'
|
|
- type_id: 'system_54b53072540eeeb8f8e9343e71f28176'
|
|
- global_system_definitions:
|
|
- user_definitions: ''
|
|
- user_includes: ''
|
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
|
|
/* clang-format on */
|
|
|
|
/***********************************************************************************************************************
|
|
* Included files
|
|
**********************************************************************************************************************/
|
|
#include "peripherals.h"
|
|
|
|
/***********************************************************************************************************************
|
|
* BOARD_InitPeripherals functional group
|
|
**********************************************************************************************************************/
|
|
/***********************************************************************************************************************
|
|
* LPUART1 initialization code
|
|
**********************************************************************************************************************/
|
|
/* clang-format off */
|
|
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
|
|
instance:
|
|
- name: 'LPUART1'
|
|
- type: 'lpuart'
|
|
- mode: 'polling'
|
|
- custom_name_enabled: 'false'
|
|
- type_id: 'lpuart_54a65a580e3462acdbacefd5299e0cac'
|
|
- functional_group: 'BOARD_InitPeripherals'
|
|
- peripheral: 'LPUART1'
|
|
- config_sets:
|
|
- lpuartConfig_t:
|
|
- lpuartConfig:
|
|
- clockSource: 'LpuartClock'
|
|
- lpuartSrcClkFreq: 'BOARD_BootClockRUN'
|
|
- baudRate_Bps: '115200'
|
|
- parityMode: 'kLPUART_ParityDisabled'
|
|
- dataBitsCount: 'kLPUART_EightDataBits'
|
|
- isMsb: 'false'
|
|
- stopBitCount: 'kLPUART_OneStopBit'
|
|
- txFifoWatermark: '0'
|
|
- rxFifoWatermark: '1'
|
|
- enableRxRTS: 'false'
|
|
- enableTxCTS: 'false'
|
|
- txCtsSource: 'kLPUART_CtsSourcePin'
|
|
- txCtsConfig: 'kLPUART_CtsSampleAtStart'
|
|
- rxIdleType: 'kLPUART_IdleTypeStartBit'
|
|
- rxIdleConfig: 'kLPUART_IdleCharacter1'
|
|
- enableTx: 'true'
|
|
- enableRx: 'true'
|
|
- quick_selection: 'QuickSelection1'
|
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
|
|
/* clang-format on */
|
|
const lpuart_config_t LPUART1_config = {
|
|
.baudRate_Bps = 115200UL,
|
|
.parityMode = kLPUART_ParityDisabled,
|
|
.dataBitsCount = kLPUART_EightDataBits,
|
|
.isMsb = false,
|
|
.stopBitCount = kLPUART_OneStopBit,
|
|
.txFifoWatermark = 0U,
|
|
.rxFifoWatermark = 1U,
|
|
.enableRxRTS = false,
|
|
.enableTxCTS = false,
|
|
.txCtsSource = kLPUART_CtsSourcePin,
|
|
.txCtsConfig = kLPUART_CtsSampleAtStart,
|
|
.rxIdleType = kLPUART_IdleTypeStartBit,
|
|
.rxIdleConfig = kLPUART_IdleCharacter1,
|
|
.enableTx = true,
|
|
.enableRx = true
|
|
};
|
|
|
|
static void LPUART1_init(void) {
|
|
LPUART_Init(LPUART1_PERIPHERAL, &LPUART1_config, LPUART1_CLOCK_SOURCE);
|
|
}
|
|
|
|
/***********************************************************************************************************************
|
|
* Initialization functions
|
|
**********************************************************************************************************************/
|
|
void BOARD_InitPeripherals(void)
|
|
{
|
|
/* Initialize components */
|
|
LPUART1_init();
|
|
}
|
|
|
|
/***********************************************************************************************************************
|
|
* BOARD_InitBootPeripherals function
|
|
**********************************************************************************************************************/
|
|
void BOARD_InitBootPeripherals(void)
|
|
{
|
|
BOARD_InitPeripherals();
|
|
}
|