1 /*
2  * Copyright (c) 2022 Raspberry Pi (Trading) Ltd.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 // -----------------------------------------------------
8 // NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
9 //       SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
10 // -----------------------------------------------------
11 //
12 //------------------------------------------------------------------------------------------
13 // Board definition for the nullbits Bit-C PRO
14 //
15 // This header may be included by other board headers as "boards/nullbits_bit_c_pro.h"
16 
17 #ifndef _BOARDS_NULLBITS_BIT_C_PRO_H
18 #define _BOARDS_NULLBITS_BIT_C_PRO_H
19 
20 // For board detection
21 #define NULLBITS_BIT_C_PRO
22 
23 // On some samples, the xosc can take longer to stabilize than is usual
24 #ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER
25 #define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64
26 #endif
27 
28 // --- BOARD SPECIFIC ---
29 #define BIT_C_PRO_LED_R_PIN 16
30 #define BIT_C_PRO_LED_G_PIN 17
31 #define BIT_C_PRO_LED_B_PIN 18
32 
33 //------------- UART -------------//
34 #ifndef PICO_DEFAULT_UART
35 #define PICO_DEFAULT_UART 0
36 #endif
37 
38 #ifndef PICO_DEFAULT_UART_TX_PIN
39 #define PICO_DEFAULT_UART_TX_PIN 0
40 #endif
41 
42 #ifndef PICO_DEFAULT_UART_RX_PIN
43 #define PICO_DEFAULT_UART_RX_PIN 1
44 #endif
45 
46 // --- LED ---
47 // Set the default LED to the Bit-C PRO's B led
48 #ifndef PICO_DEFAULT_LED_PIN
49 #define PICO_DEFAULT_LED_PIN BIT_C_PRO_LED_B_PIN
50 #endif
51 
52 #ifndef PICO_DEFAULT_LED_PIN_INVERTED
53 #define PICO_DEFAULT_LED_PIN_INVERTED 1
54 #endif
55 // no PICO_DEFAULT_WS2812_PIN
56 
57 //------------- I2C -------------//
58 #ifndef PICO_DEFAULT_I2C
59 #define PICO_DEFAULT_I2C 0
60 #endif
61 
62 #ifndef PICO_DEFAULT_I2C_SDA_PIN
63 #define PICO_DEFAULT_I2C_SDA_PIN 2
64 #endif
65 
66 #ifndef PICO_DEFAULT_I2C_SCL_PIN
67 #define PICO_DEFAULT_I2C_SCL_PIN 3
68 #endif
69 
70 //------------- SPI -------------//
71 #ifndef PICO_DEFAULT_SPI
72 #define PICO_DEFAULT_SPI 0
73 #endif
74 
75 #ifndef PICO_DEFAULT_SPI_TX_PIN
76 #define PICO_DEFAULT_SPI_TX_PIN 23
77 #endif
78 
79 #ifndef PICO_DEFAULT_SPI_RX_PIN
80 #define PICO_DEFAULT_SPI_RX_PIN 20
81 #endif
82 
83 #ifndef PICO_DEFAULT_SPI_SCK_PIN
84 #define PICO_DEFAULT_SPI_SCK_PIN 22
85 #endif
86 
87 #ifndef PICO_DEFAULT_SPI_CSN_PIN
88 #define PICO_DEFAULT_SPI_CSN_PIN 21
89 #endif
90 
91 //------------- FLASH -------------//
92 
93 // Best performance/compatibility with selected flash
94 #define PICO_BOOT_STAGE2_CHOOSE_W25X10CL 1
95 
96 #ifndef PICO_FLASH_SPI_CLKDIV
97 #define PICO_FLASH_SPI_CLKDIV 2
98 #endif
99 
100 // Bit-C PRO has 4MB SPI flash
101 #ifndef PICO_FLASH_SIZE_BYTES
102 #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024)
103 #endif
104 
105 // All boards have B1+ RP2040
106 #ifndef PICO_RP2040_B0_SUPPORTED
107 #define PICO_RP2040_B0_SUPPORTED 0
108 #endif
109 
110 #endif
111