Rationalize board header pin defines, and add partner board headers (#192)
* Board definition header files for the iniital set of SparkFun rp2040 boards * Add default PICO_DEFAULT_I2C*, allow no PICO_DEFAULT_LED_PIN, no PICO_DEFAULT_UART* (instead of -1) Fixup SparkFun headers * Pimoroni board headers * Add LED related board defines PICO_CONFIGs (to pico_stdlib for now) * more board config changes * add Adafruit feather, itsybitsy, qtpy board headers * add PICO_DEFAULT_WS2812_POWER_PIN define * MOSI/MISO -> TX/RX, some UART cleanup.. make vgaboard.h defines take preference over pico.h ones * local change to tinyusb to cope with no default LED or UART * fix review issues Co-authored-by: Kirk Benell <github-stuff@accvec.com> Co-authored-by: ZodiusInfuser <christopher.parrott2@gmail.com> Co-authored-by: hathach <thach@tinyusb.org>
This commit is contained in:
committed by
graham sanderson
parent
839224c2a3
commit
7ee36e3328
@ -35,6 +35,12 @@ 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, default=undefined, group=hardware_spi
|
||||
// PICO_CONFIG: PICO_DEFAULT_SPI_SCK_PIN, Define the default SPI SCK pin, min=0, max=29, default=undefined, group=hardware_spi
|
||||
// PICO_CONFIG: PICO_DEFAULT_SPI_TX_PIN, Define the default SPI TX pin, min=0, max=29, default=undefined, group=hardware_spi
|
||||
// PICO_CONFIG: PICO_DEFAULT_SPI_RX_PIN, Define the default SPI RX pin, min=0, max=29, default=undefined, group=hardware_spi
|
||||
// PICO_CONFIG: PICO_DEFAULT_SPI_CSN_PIN, Define the default SPI CSN pin, min=0, max=29, default=undefined, group=hardware_spi
|
||||
|
||||
/**
|
||||
* Opaque type representing an SPI instance.
|
||||
*/
|
||||
@ -56,6 +62,14 @@ typedef struct spi_inst spi_inst_t;
|
||||
*/
|
||||
#define spi1 ((spi_inst_t * const)spi1_hw)
|
||||
|
||||
#if !defined(PICO_DEFAULT_SPI_INSTANCE) && defined(PICO_DEFAULT_SPI)
|
||||
#define PICO_DEFAULT_SPI_INSTANCE (__CONCAT(spi,PICO_DEFAULT_SPI))
|
||||
#endif
|
||||
|
||||
#ifdef PICO_DEFAULT_SPI_INSTANCE
|
||||
#define spi_default PICO_DEFAULT_SPI_INSTANCE
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
SPI_CPHA_0 = 0,
|
||||
SPI_CPHA_1 = 1
|
||||
|
Reference in New Issue
Block a user