mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
Freedom-KL25Z: Add pin configuration for add-on ADXL345 board. From Alan Carvalho de Assis
This commit is contained in:
@@ -202,9 +202,17 @@
|
|||||||
* alternative.
|
* alternative.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PIN_SPI0_SCK (PIN_SPI0_SCK_2 | PIN_ALT2_PULLUP)
|
/* SPI0 Pinout
|
||||||
#define PIN_SPI0_MISO (PIN_SPI0_MISO_4 | PIN_ALT2_PULLUP)
|
* ===========
|
||||||
#define PIN_SPI0_MOSI (PIN_SPI0_MOSI_3 | PIN_ALT2_PULLUP)
|
*
|
||||||
|
* 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_SCK (PIN_SPI1_SCK_2 | PIN_ALT2_PULLUP)
|
||||||
#define PIN_SPI1_MISO (PIN_SPI1_MISO_3 | 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_IRQ (GPIO_INPUT | PIN_PORTA | PIN16)
|
||||||
#define GPIO_WIFI_CS (GPIO_OUTPUT | GPIO_OUTPUT_ONE | PIN_PORTE | PIN1)
|
#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)
|
#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
|
CSRCS += kl_tsi.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_KL_SPI),y)
|
ifeq ($(CONFIG_KL_SPI0),y)
|
||||||
CSRCS += kl_spi.c
|
CSRCS += kl_spi.c
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_KL_SPI1),y)
|
||||||
|
CSRCS += kl_spi.c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_HAVE_CXX),y)
|
ifeq ($(CONFIG_HAVE_CXX),y)
|
||||||
|
|||||||
@@ -57,18 +57,14 @@
|
|||||||
|
|
||||||
/* Enables debug output from this file (needs CONFIG_DEBUG too) */
|
/* Enables debug output from this file (needs CONFIG_DEBUG too) */
|
||||||
|
|
||||||
#undef SPI_DEBUG /* Define to enable debug */
|
#ifdef CONFIG_DEBUG_SPI
|
||||||
#undef SPI_VERBOSE /* Define to enable verbose debug */
|
|
||||||
|
|
||||||
#ifdef SPI_DEBUG
|
|
||||||
# define spidbg lldbg
|
# define spidbg lldbg
|
||||||
# ifdef SPI_VERBOSE
|
# ifdef CONFIG_DEBUG_VERBOSE
|
||||||
# define spivdbg lldbg
|
# define spivdbg lldbg
|
||||||
# else
|
# else
|
||||||
# define spivdbg(x...)
|
# define spivdbg(x...)
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# undef SPI_VERBOSE
|
|
||||||
# define spidbg(x...)
|
# define spidbg(x...)
|
||||||
# define spivdbg(x...)
|
# define spivdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user