Small changes to the binary_info pin names

This commit is contained in:
Andrew Scheller 2021-03-04 17:58:13 +00:00 committed by Graham Sanderson
parent 13a84b8f63
commit ecd79e9456
5 changed files with 6 additions and 8 deletions

View File

@ -114,8 +114,6 @@ int main() {
gpio_init(PICO_DEFAULT_SPI_CSN_PIN);
gpio_put(PICO_DEFAULT_SPI_CSN_PIN, 1);
gpio_set_dir(PICO_DEFAULT_SPI_CSN_PIN, GPIO_OUT);
// Make the CS pin available to picotool
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "CS"));
uint offset = pio_add_program(spi.pio, &spi_cpha0_program);
printf("Loaded program at %d\n", offset);
@ -129,8 +127,8 @@ int main() {
PICO_DEFAULT_SPI_TX_PIN,
PICO_DEFAULT_SPI_RX_PIN
);
// Make the SPI pins available to picotool
bi_decl(bi_3pins_with_func(PICO_DEFAULT_SPI_RX_PIN, PICO_DEFAULT_SPI_TX_PIN, PICO_DEFAULT_SPI_SCK_PIN, GPIO_FUNC_PIO0));
// Make the 'SPI' pins available to picotool
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"));
uint8_t page_buf[FLASH_PAGE_SIZE];

View File

@ -206,7 +206,7 @@ int main() {
gpio_set_dir(PICO_DEFAULT_SPI_CSN_PIN, GPIO_OUT);
gpio_put(PICO_DEFAULT_SPI_CSN_PIN, 1);
// Make the CS pin available to picotool
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "CS"));
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "SPI CS"));
// See if SPI is working - interrograte the device for its I2C ID number, should be 0x60
uint8_t id;

View File

@ -126,7 +126,7 @@ int main() {
gpio_set_dir(PIN_CS, GPIO_OUT);
gpio_put(PIN_CS, 1);
// Make the CS pin available to picotool
bi_decl(bi_1pin_with_name(PIN_CS, "CS"));
bi_decl(bi_1pin_with_name(PIN_CS, "SPI CS"));
mpu9250_reset();

View File

@ -34,7 +34,7 @@ int main() {
// Make the SPI pins available to picotool
bi_decl(bi_3pins_with_func(PICO_DEFAULT_SPI_RX_PIN, PICO_DEFAULT_SPI_TX_PIN, PICO_DEFAULT_SPI_SCK_PIN, GPIO_FUNC_SPI));
// Make the CS pin available to picotool
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "CS"));
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "SPI CS"));
// Grab some unused dma channels
const uint dma_tx = dma_claim_unused_channel(true);

View File

@ -126,7 +126,7 @@ int main() {
gpio_put(PICO_DEFAULT_SPI_CSN_PIN, 1);
gpio_set_dir(PICO_DEFAULT_SPI_CSN_PIN, GPIO_OUT);
// Make the CS pin available to picotool
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "CS"));
bi_decl(bi_1pin_with_name(PICO_DEFAULT_SPI_CSN_PIN, "SPI CS"));
printf("SPI initialised, let's goooooo\n");