Skip to content

Commit b369755

Browse files
lurchkilograham
authored andcommitted
Small changes to the binary_info pin names
1 parent 47e4b7f commit b369755

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

pio/spi/spi_flash.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ int main() {
114114
gpio_init(PICO_DEFAULT_SPI_CSN_PIN);
115115
gpio_put(PICO_DEFAULT_SPI_CSN_PIN, 1);
116116
gpio_set_dir(PICO_DEFAULT_SPI_CSN_PIN, GPIO_OUT);
117-
// Make the CS pin available to picotool
118-
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "CS"));
119117

120118
uint offset = pio_add_program(spi.pio, &spi_cpha0_program);
121119
printf("Loaded program at %d\n", offset);
@@ -129,8 +127,8 @@ int main() {
129127
PICO_DEFAULT_SPI_TX_PIN,
130128
PICO_DEFAULT_SPI_RX_PIN
131129
);
132-
// Make the SPI pins available to picotool
133-
bi_decl(bi_3pins_with_func(PICO_DEFAULT_SPI_RX_PIN, PICO_DEFAULT_SPI_TX_PIN, PICO_DEFAULT_SPI_SCK_PIN, GPIO_FUNC_PIO0));
130+
// Make the 'SPI' pins available to picotool
131+
bi_decl(bi_4pins_with_names(PICO_DEFAULT_SPI_RX_PIN, "SPI RX", PICO_DEFAULT_SPI_TX_PIN, "SPI TX", PICO_DEFAULT_SPI_SCK_PIN, "SPI SCK", PICO_DEFAULT_SPI_CSN_PIN, "SPI CS"));
134132

135133
uint8_t page_buf[FLASH_PAGE_SIZE];
136134

spi/bme280_spi/bme280_spi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ int main() {
206206
gpio_set_dir(PICO_DEFAULT_SPI_CSN_PIN, GPIO_OUT);
207207
gpio_put(PICO_DEFAULT_SPI_CSN_PIN, 1);
208208
// Make the CS pin available to picotool
209-
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "CS"));
209+
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "SPI CS"));
210210

211211
// See if SPI is working - interrograte the device for its I2C ID number, should be 0x60
212212
uint8_t id;

spi/mpu9250_spi/mpu9250_spi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ int main() {
126126
gpio_set_dir(PIN_CS, GPIO_OUT);
127127
gpio_put(PIN_CS, 1);
128128
// Make the CS pin available to picotool
129-
bi_decl(bi_1pin_with_name(PIN_CS, "CS"));
129+
bi_decl(bi_1pin_with_name(PIN_CS, "SPI CS"));
130130

131131
mpu9250_reset();
132132

spi/spi_dma/spi_dma.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ int main() {
3434
// Make the SPI pins available to picotool
3535
bi_decl(bi_3pins_with_func(PICO_DEFAULT_SPI_RX_PIN, PICO_DEFAULT_SPI_TX_PIN, PICO_DEFAULT_SPI_SCK_PIN, GPIO_FUNC_SPI));
3636
// Make the CS pin available to picotool
37-
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "CS"));
37+
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "SPI CS"));
3838

3939
// Grab some unused dma channels
4040
const uint dma_tx = dma_claim_unused_channel(true);

spi/spi_flash/spi_flash.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ int main() {
126126
gpio_put(PICO_DEFAULT_SPI_CSN_PIN, 1);
127127
gpio_set_dir(PICO_DEFAULT_SPI_CSN_PIN, GPIO_OUT);
128128
// Make the CS pin available to picotool
129-
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "CS"));
129+
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "SPI CS"));
130130

131131
printf("SPI initialised, let's goooooo\n");
132132

0 commit comments

Comments
 (0)