Add PICO_DEFAULT_SPI pins to pico.h (#225)
(and define min and max values for some of the PICO_DEFAULT_* configs)
This commit is contained in:
parent
2b1dbfa3d2
commit
62b2d33e8f
@ -42,6 +42,23 @@
|
||||
#define PICO_DEFAULT_I2C_SCL_PIN 5
|
||||
#endif
|
||||
|
||||
// --- SPI ---
|
||||
#ifndef PICO_DEFAULT_SPI
|
||||
#define PICO_DEFAULT_SPI 0
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_SPI_SCK_PIN
|
||||
#define PICO_DEFAULT_SPI_SCK_PIN 18
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_SPI_TX_PIN
|
||||
#define PICO_DEFAULT_SPI_TX_PIN 19
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_SPI_RX_PIN
|
||||
#define PICO_DEFAULT_SPI_RX_PIN 16
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_SPI_CSN_PIN
|
||||
#define PICO_DEFAULT_SPI_CSN_PIN 17
|
||||
#endif
|
||||
|
||||
// --- FLASH ---
|
||||
|
||||
#ifndef PICO_FLASH_SPI_CLKDIV
|
||||
|
@ -48,7 +48,7 @@ extern "C" {
|
||||
|
||||
typedef struct i2c_inst i2c_inst_t;
|
||||
|
||||
// PICO_CONFIG: PICO_DEFAULT_I2C, Define the default I2C for a board, group=hardware_i2c
|
||||
// PICO_CONFIG: PICO_DEFAULT_I2C, Define the default I2C for a board, min=0, max=1, group=hardware_i2c
|
||||
// PICO_CONFIG: PICO_DEFAULT_I2C_SDA_PIN, Define the default I2C SDA pin, min=0, max=29, group=hardware_i2c
|
||||
// PICO_CONFIG: PICO_DEFAULT_I2C_SCL_PIN, Define the default I2C SCL pin, min=0, max=29, group=hardware_i2c
|
||||
|
||||
|
@ -35,7 +35,7 @@ extern "C" {
|
||||
* Each controller can be connected to a number of GPIO pins, see the datasheet GPIO function selection table for more information.
|
||||
*/
|
||||
|
||||
// PICO_CONFIG: PICO_DEFAULT_SPI, Define the default SPI for a board, group=hardware_spi
|
||||
// PICO_CONFIG: PICO_DEFAULT_SPI, Define the default SPI for a board, min=0, max=1, group=hardware_spi
|
||||
// PICO_CONFIG: PICO_DEFAULT_SPI_SCK_PIN, Define the default SPI SCK pin, min=0, max=29, group=hardware_spi
|
||||
// PICO_CONFIG: PICO_DEFAULT_SPI_TX_PIN, Define the default SPI TX pin, min=0, max=29, group=hardware_spi
|
||||
// PICO_CONFIG: PICO_DEFAULT_SPI_RX_PIN, Define the default SPI RX pin, min=0, max=29, group=hardware_spi
|
||||
|
@ -29,7 +29,7 @@ extern "C" {
|
||||
#define PICO_UART_DEFAULT_CRLF 0
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_DEFAULT_UART, Define the default UART used for printf etc, group=hardware_uart
|
||||
// PICO_CONFIG: PICO_DEFAULT_UART, Define the default UART used for printf etc, min=0, max=1, group=hardware_uart
|
||||
// PICO_CONFIG: PICO_DEFAULT_UART_TX_PIN, Define the default UART TX pin, min=0, max=29, group=hardware_uart
|
||||
// PICO_CONFIG: PICO_DEFAULT_UART_RX_PIN, Define the default UART RX pin, min=0, max=29, group=hardware_uart
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user