-
Notifications
You must be signed in to change notification settings - Fork 978
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add script to automatically validate board header files * Fix small automatically-found inconsistencies in various board header files * Tweak and add board header file from abandoned PR #1174
- Loading branch information
Showing
13 changed files
with
370 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
// ----------------------------------------------------- | ||
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO | ||
// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES | ||
// ----------------------------------------------------- | ||
// | ||
//------------------------------------------------------------------------------------------ | ||
// Board definition for the 0xCB Helios | ||
|
||
#ifndef _BOARDS_0XCB_HELIOS_H | ||
#define _BOARDS_0XCB_HELIOS_H | ||
|
||
// For board detection | ||
#define _0XCB_HELIOS | ||
|
||
#ifndef PICO_DEFAULT_UART | ||
#define PICO_DEFAULT_UART 0 | ||
#endif | ||
#ifndef PICO_DEFAULT_UART_TX_PIN | ||
#define PICO_DEFAULT_UART_TX_PIN 0 | ||
#endif | ||
#ifndef PICO_DEFAULT_UART_RX_PIN | ||
#define PICO_DEFAULT_UART_RX_PIN 1 | ||
#endif | ||
|
||
// User LED and level shifted PIN | ||
#ifndef PICO_DEFAULT_LED_PIN | ||
#define PICO_DEFAULT_LED_PIN 17 | ||
#endif | ||
#ifndef PICO_DEFAULT_WS2812_PIN | ||
#define PICO_DEFAULT_WS2812_PIN 25 | ||
#endif | ||
|
||
// --- I2C --- | ||
#ifndef PICO_DEFAULT_I2C | ||
#define PICO_DEFAULT_I2C 1 | ||
#endif | ||
#ifndef PICO_DEFAULT_I2C_SDA_PIN | ||
#define PICO_DEFAULT_I2C_SDA_PIN 2 | ||
#endif | ||
#ifndef PICO_DEFAULT_I2C_SCL_PIN | ||
#define PICO_DEFAULT_I2C_SCL_PIN 3 | ||
#endif | ||
|
||
// --- SPI --- | ||
#ifndef PICO_DEFAULT_SPI | ||
#define PICO_DEFAULT_SPI 0 | ||
#endif | ||
#ifndef PICO_DEFAULT_SPI_SCK_PIN | ||
#define PICO_DEFAULT_SPI_SCK_PIN 22 | ||
#endif | ||
#ifndef PICO_DEFAULT_SPI_TX_PIN | ||
#define PICO_DEFAULT_SPI_TX_PIN 23 | ||
#endif | ||
#ifndef PICO_DEFAULT_SPI_RX_PIN | ||
#define PICO_DEFAULT_SPI_RX_PIN 20 | ||
#endif | ||
#ifndef PICO_DEFAULT_SPI_CSN_PIN | ||
#define PICO_DEFAULT_SPI_CSN_PIN 21 | ||
#endif | ||
|
||
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1 | ||
|
||
#ifndef PICO_FLASH_SPI_CLKDIV | ||
#define PICO_FLASH_SPI_CLKDIV 2 | ||
#endif | ||
|
||
// board has 16M onboard flash | ||
#ifndef PICO_FLASH_SIZE_BYTES | ||
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) | ||
#endif | ||
|
||
// All boards have B1 RP2040 | ||
|
||
#ifndef PICO_RP2040_B0_SUPPORTED | ||
#define PICO_RP2040_B0_SUPPORTED 0 | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"UART": { | ||
"0": { | ||
"TX": [0, 12, 16, 28], | ||
"RX": [1, 13, 17, 29], | ||
"CTS": [2, 14, 18], | ||
"RTS": [3, 15, 19] | ||
}, | ||
"1": { | ||
"TX": [4, 8, 20, 24], | ||
"RX": [5, 9, 21, 25], | ||
"CTS": [6, 10, 22, 26], | ||
"RTS": [7, 11, 23, 27] | ||
} | ||
}, | ||
"I2C": { | ||
"0": { | ||
"SDA": [0, 4, 8, 12, 16, 20, 24, 28], | ||
"SCL": [1, 5, 9, 13, 17, 21, 25, 29] | ||
}, | ||
"1": { | ||
"SDA": [2, 6, 10, 14, 18, 22, 26], | ||
"SCL": [3, 7, 11, 15, 19, 23, 27] | ||
} | ||
}, | ||
"SPI": { | ||
"0": { | ||
"RX": [0, 4, 16, 20], | ||
"CSN": [1, 5, 17, 21], | ||
"SCK": [2, 6, 18, 22], | ||
"TX": [3, 7, 19, 23] | ||
}, | ||
"1": { | ||
"RX": [8, 12, 24, 28], | ||
"CSN": [9, 13, 25, 29], | ||
"SCK": [10, 14, 26], | ||
"TX": [11, 15, 27] | ||
} | ||
}, | ||
"PWM": { | ||
"0": { | ||
"A": [0, 16], | ||
"B": [1, 17] | ||
}, | ||
"1": { | ||
"A": [2, 18], | ||
"B": [3, 19] | ||
}, | ||
"2": { | ||
"A": [4, 20], | ||
"B": [5, 21] | ||
}, | ||
"3": { | ||
"A": [6, 22], | ||
"B": [7, 23] | ||
}, | ||
"4": { | ||
"A": [8, 24], | ||
"B": [9, 25] | ||
}, | ||
"5": { | ||
"A": [10, 26], | ||
"B": [11, 27] | ||
}, | ||
"6": { | ||
"A": [12, 28], | ||
"B": [13, 29] | ||
}, | ||
"7": { | ||
"A": [14], | ||
"B": [15] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
for HEADER in src/boards/include/boards/*.h; do | ||
tools/check_board_header.py $HEADER | ||
if [[ $? -ne 0 ]]; then | ||
break | ||
fi | ||
done |
Oops, something went wrong.