92 lines
3.8 KiB
C
92 lines
3.8 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: Pins v11.0
|
|
processor: MK60DN512xxx10
|
|
package_id: MK60DN512VLQ10
|
|
mcu_data: ksdk2_0
|
|
processor_version: 11.0.1
|
|
pin_labels:
|
|
- {pin_num: '58', pin_signal: PTA6/FTM0_CH3/TRACE_CLKOUT, label: BUZZER, identifier: BUZZER}
|
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
|
|
*/
|
|
/* clang-format on */
|
|
|
|
#include "fsl_common.h"
|
|
#include "fsl_port.h"
|
|
#include "fsl_gpio.h"
|
|
#include "pin_mux.h"
|
|
|
|
/* FUNCTION ************************************************************************************************************
|
|
*
|
|
* Function Name : BOARD_InitBootPins
|
|
* Description : Calls initialization functions.
|
|
*
|
|
* END ****************************************************************************************************************/
|
|
void BOARD_InitBootPins(void)
|
|
{
|
|
BOARD_InitPins();
|
|
}
|
|
|
|
/* clang-format off */
|
|
/*
|
|
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
|
|
BOARD_InitPins:
|
|
- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
|
|
- pin_list:
|
|
- {pin_num: '136', peripheral: UART0, signal: TX, pin_signal: PTD7/CMT_IRO/UART0_TX/FTM0_CH7/FTM0_FLT1}
|
|
- {pin_num: '133', peripheral: UART0, signal: RX, pin_signal: ADC0_SE7b/PTD6/LLWU_P15/SPI0_PCS3/UART0_RX/FTM0_CH6/FB_AD0/FTM0_FLT0}
|
|
- {pin_num: '58', peripheral: GPIOA, signal: 'GPIO, 6', pin_signal: PTA6/FTM0_CH3/TRACE_CLKOUT, direction: OUTPUT}
|
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
|
|
*/
|
|
/* clang-format on */
|
|
|
|
/* FUNCTION ************************************************************************************************************
|
|
*
|
|
* Function Name : BOARD_InitPins
|
|
* Description : Configures pin routing and optionally pin electrical features.
|
|
*
|
|
* END ****************************************************************************************************************/
|
|
void BOARD_InitPins(void)
|
|
{
|
|
/* Port A Clock Gate Control: Clock enabled */
|
|
CLOCK_EnableClock(kCLOCK_PortA);
|
|
/* Port D Clock Gate Control: Clock enabled */
|
|
CLOCK_EnableClock(kCLOCK_PortD);
|
|
|
|
gpio_pin_config_t BUZZER_config = {
|
|
.pinDirection = kGPIO_DigitalOutput,
|
|
.outputLogic = 0U
|
|
};
|
|
/* Initialize GPIO functionality on pin PTA6 (pin 58) */
|
|
GPIO_PinInit(BOARD_INITPINS_BUZZER_GPIO, BOARD_INITPINS_BUZZER_PIN, &BUZZER_config);
|
|
|
|
/* PORTA6 (pin 58) is configured as PTA6 */
|
|
PORT_SetPinMux(BOARD_INITPINS_BUZZER_PORT, BOARD_INITPINS_BUZZER_PIN, kPORT_MuxAsGpio);
|
|
|
|
/* PORTD6 (pin 133) is configured as UART0_RX */
|
|
PORT_SetPinMux(PORTD, 6U, kPORT_MuxAlt3);
|
|
|
|
/* PORTD7 (pin 136) is configured as UART0_TX */
|
|
PORT_SetPinMux(PORTD, 7U, kPORT_MuxAlt3);
|
|
|
|
SIM->SOPT5 = ((SIM->SOPT5 &
|
|
/* Mask bits to zero which are setting */
|
|
(~(SIM_SOPT5_UART0TXSRC_MASK | SIM_SOPT5_UART0RXSRC_MASK)))
|
|
|
|
/* UART 0 transmit data source select: UART0_TX pin. */
|
|
| SIM_SOPT5_UART0TXSRC(SOPT5_UART0TXSRC_UART_TX)
|
|
|
|
/* UART 0 receive data source select: UART0_RX pin. */
|
|
| SIM_SOPT5_UART0RXSRC(SOPT5_UART0RXSRC_UART_RX));
|
|
}
|
|
/***********************************************************************************************************************
|
|
* EOF
|
|
**********************************************************************************************************************/
|