1 /* 2 * Copyright 2019 NXP 3 * All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 /** 8 * @file lpc55s36.h 9 * @brief The lpc55s36.h file defines GPIO pin mappings for LPCXpresso55S36 board 10 */ 11 12 #ifndef LPC55S36_H_ 13 #define LPC55S36_H_ 14 15 #include "pin_mux.h" 16 #include "fsl_power.h" 17 #include "RTE_Device.h" 18 #include "gpio_driver.h" 19 #include "clock_config.h" 20 21 #define PORT0 0 22 #define PORT1 1 23 24 // I2C4 Pin Handles 25 extern gpioHandleKSDK_t D14; 26 extern gpioHandleKSDK_t D15; 27 28 // SPI7 Handles 29 extern gpioHandleKSDK_t D11; 30 extern gpioHandleKSDK_t D12; 31 extern gpioHandleKSDK_t D13; 32 33 // UART0 Handle 34 extern gpioHandleKSDK_t D0; 35 extern gpioHandleKSDK_t D1; 36 37 // LPCXpresso54114 Internal Peripheral Pin Definitions 38 extern gpioHandleKSDK_t RED_LED; 39 extern gpioHandleKSDK_t GREEN_LED; 40 extern gpioHandleKSDK_t BLUE_LED; 41 42 // I2C_S1: Pin mapping and driver information for default I2C brought to shield 43 #define I2C_S1_SCL_PIN D15 44 #define I2C_S1_SDA_PIN D14 45 #define I2C_S1_DRIVER Driver_I2C2 46 #define I2C_S1_DEVICE_INDEX I2C2_INDEX 47 #define I2C_S1_SIGNAL_EVENT I2C2_SignalEvent_t 48 49 // SPI_S: Pin mapping and driver information default SPI brought to shield 50 #define SPI_S_DRIVER Driver_SPI2 51 #define SPI_S_BAUDRATE 500000U ///< Transfer baudrate - 500k 52 #define SPI_S_DEVICE_INDEX SPI2_INDEX 53 #define SPI_S_SIGNAL_EVENT SPI2_SignalEvent_t 54 55 // UART: Driver information for default UART to communicate with HOST PC. 56 #define HOST_S_DRIVER Driver_USART0 57 #define HOST_S_SIGNAL_EVENT HOST_SignalEvent_t 58 #define HOST_B_DRIVER Driver_USART1 59 #define HOST_B_SIGNAL_EVENT HOST_SignalEvent_t 60 61 /* @brief Ask use input to resume after specified samples have been processed. */ 62 #define ASK_USER_TO_RESUME(x) \ 63 static bool askResume = true; \ 64 static uint16_t samplesToProcess = x - 1; \ 65 if (askResume && !samplesToProcess--) \ 66 { \ 67 PRINTF("\r\n Specified samples processed, press any key to continue... \r\n"); \ 68 GETCHAR(); \ 69 askResume = false; \ 70 } 71 72 /* @brief dummy arguement to Power Mode Wait Wrapper. */ 73 #define SMC NULL 74 75 /* @brief Kinetis style Wrapper API for Power Mode Wait (Wait for Interrupt). */ 76 status_t SMC_SetPowerModeWait(void *); 77 /* @brief Kinetis style Wrapper API for Power Mode VLPR (Wait for Interrupt). */ 78 status_t SMC_SetPowerModeVlpr(void *); 79 /* @brief Kinetis style Wrapper API for handling all Clock related configurations. */ 80 void BOARD_BootClockRUN(void); 81 #endif /* LPC55S36_H_ */ 82