Freedom-KL25Z: Add pin configuration for add-on ADXL345 board. From Alan Carvalho de Assis
This commit is contained in:
parent
c59b9967ba
commit
93a21d2872
@ -202,9 +202,17 @@
|
||||
* alternative.
|
||||
*/
|
||||
|
||||
#define PIN_SPI0_SCK (PIN_SPI0_SCK_2 | PIN_ALT2_PULLUP)
|
||||
#define PIN_SPI0_MISO (PIN_SPI0_MISO_4 | PIN_ALT2_PULLUP)
|
||||
#define PIN_SPI0_MOSI (PIN_SPI0_MOSI_3 | PIN_ALT2_PULLUP)
|
||||
/* SPI0 Pinout
|
||||
* ===========
|
||||
*
|
||||
* SCK = PTD1 (D13 at connector J2 pin 12 of Freedom Board)
|
||||
* MISO = PTD3 (D12 at connector J2 pin 10 of Freedom Board)
|
||||
* MOSI = PTD2 (D11 at connector J2 pin 8 of Freedom Board)
|
||||
*/
|
||||
|
||||
#define PIN_SPI0_SCK (PIN_SPI0_SCK_3 | PIN_ALT2_PULLUP)
|
||||
#define PIN_SPI0_MISO (PIN_SPI0_MISO_6 | PIN_ALT2_PULLUP)
|
||||
#define PIN_SPI0_MOSI (PIN_SPI0_MOSI_5 | PIN_ALT2_PULLUP)
|
||||
|
||||
#define PIN_SPI1_SCK (PIN_SPI1_SCK_2 | PIN_ALT2_PULLUP)
|
||||
#define PIN_SPI1_MISO (PIN_SPI1_MISO_3 | PIN_ALT2_PULLUP)
|
||||
@ -216,9 +224,13 @@
|
||||
#define GPIO_WIFI_IRQ (GPIO_INPUT | PIN_PORTA | PIN16)
|
||||
#define GPIO_WIFI_CS (GPIO_OUTPUT | GPIO_OUTPUT_ONE | PIN_PORTE | PIN1)
|
||||
|
||||
/* Interrupt pin used by ADXL345 */
|
||||
/* Interrupt pin used by ADXL345
|
||||
*
|
||||
* CS = PTD0 (D10 at connector J2 pin 6 of Freedom Board)
|
||||
* INT1 = PTA16 (at connector J2 pin 9 of Freedom Board)
|
||||
*/
|
||||
|
||||
#define GPIO_ADXL345_INT1 (GPIO_INPUT | PIN_PORTA | PIN_INT_RISING | PIN4)
|
||||
#define GPIO_ADXL345_INT1 (GPIO_INPUT | PIN_PORTA | PIN_INT_RISING | PIN16)
|
||||
#define GPIO_ADXL345_CS (GPIO_OUTPUT | GPIO_OUTPUT_ONE | PIN_PORTD | PIN0)
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -54,8 +54,12 @@ ifeq ($(CONFIG_KL_TSI),y)
|
||||
CSRCS += kl_tsi.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_KL_SPI),y)
|
||||
ifeq ($(CONFIG_KL_SPI0),y)
|
||||
CSRCS += kl_spi.c
|
||||
else
|
||||
ifeq ($(CONFIG_KL_SPI1),y)
|
||||
CSRCS += kl_spi.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_HAVE_CXX),y)
|
||||
|
@ -57,18 +57,14 @@
|
||||
|
||||
/* Enables debug output from this file (needs CONFIG_DEBUG too) */
|
||||
|
||||
#undef SPI_DEBUG /* Define to enable debug */
|
||||
#undef SPI_VERBOSE /* Define to enable verbose debug */
|
||||
|
||||
#ifdef SPI_DEBUG
|
||||
#ifdef CONFIG_DEBUG_SPI
|
||||
# define spidbg lldbg
|
||||
# ifdef SPI_VERBOSE
|
||||
# ifdef CONFIG_DEBUG_VERBOSE
|
||||
# define spivdbg lldbg
|
||||
# else
|
||||
# define spivdbg(x...)
|
||||
# endif
|
||||
#else
|
||||
# undef SPI_VERBOSE
|
||||
# define spidbg(x...)
|
||||
# define spivdbg(x...)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user