Skip to content

Commit

Permalink
Merge pull request ARMmbed#100 from linlingao/add_sd_config
Browse files Browse the repository at this point in the history
Fixed a false assertion. Apparently NC is now allowed to passed to gp…
  • Loading branch information
linlingao authored May 9, 2019
2 parents 855b530 + 1f6a20b commit 7d5a38d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions components/storage/blockdevice/COMPONENT_SD/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@
"SPI_CLK": "D13",
"SPI_CS": "D10"
},
"CC3220SF": {
"SPI_MOSI": "P07",
"SPI_MISO": "P06",
"SPI_CLK": "P05",
"SPI_CS": "P08"
"CC3220SF_LAUNCHXL": {
"SPI_MOSI": "D11",
"SPI_MISO": "D12",
"SPI_CLK": "D13",
"SPI_CS": "D10"
}
}
}
10 changes: 6 additions & 4 deletions targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/gpio_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,21 @@

uint32_t gpio_set(PinName pin)
{
pin_function(pin, 0);
return (1);
pin_function(pin, 0);
return (1);
}

// function to initialise the gpio pin
// this links the board control bits for each pin
// with the object created for the pin
void gpio_init(gpio_t *obj, PinName pin)
{
MBED_ASSERT(pin != (PinName)NC);
obj->pin = pin;
if (pin == (PinName)NC)
return;

unsigned long gpio_base = (unsigned long)pinmap_peripheral(pin, PinMap_GPIO);
obj->baseAddr = gpio_base;
obj->pin = pin;
obj->pin_mask = 1<<(pinmap_find_function(pin, PinMap_GPIO)%8);

// determine PRCM GPIO CLOCK index
Expand Down

0 comments on commit 7d5a38d

Please sign in to comment.