adriendesp opened a new pull request, #13292:
URL: https://github.com/apache/nuttx/pull/13292

   ## Summary
   The input stage DX0 is used for MISO signal. The register DX0CR select the 
pinmux input signal (DX0A, DX0B, ..., DX0G).
   Currently only one input signal was possible for all active SPI channel due 
to global BOARD_SPI_DX define. 
   I added the suport for individual BOARD_SPIx_DX for each SPI channel. 
   
   `/* USIC1 CH0 is used as SPI2
    *
    *  MOSI - P0.5
    *  MISO - P0.4
    *  SCLK - P0.11
    */
   
   #define BOARD_SPI2_DX USIC_DXA
   #define GPIO_SPI2_MOSI (GPIO_U1C0_DOUT0_2 | GPIO_PADA2_STRONGMEDIUM | 
GPIO_OUTPUT_CLEAR)
   #define GPIO_SPI2_MISO (GPIO_U1C0_DX0A)
   #define GPIO_SPI2_SCLK (GPIO_U1C0_SCLKOUT_1 | GPIO_PADA2_STRONGMEDIUM)
   `
   
   ## Impact
   It is retro-compatible with previous BOARD_SPI_DX define, so old code won't 
break. 
   
   ## Testing
   Tested on custom XMC4800 board. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to