Skip to content

Commit 7d5a38d

Browse files
authored
Merge pull request ARMmbed#100 from linlingao/add_sd_config
Fixed a false assertion. Apparently NC is now allowed to passed to gp…
2 parents 855b530 + 1f6a20b commit 7d5a38d

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

components/storage/blockdevice/COMPONENT_SD/mbed_lib.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@
166166
"SPI_CLK": "D13",
167167
"SPI_CS": "D10"
168168
},
169-
"CC3220SF": {
170-
"SPI_MOSI": "P07",
171-
"SPI_MISO": "P06",
172-
"SPI_CLK": "P05",
173-
"SPI_CS": "P08"
169+
"CC3220SF_LAUNCHXL": {
170+
"SPI_MOSI": "D11",
171+
"SPI_MISO": "D12",
172+
"SPI_CLK": "D13",
173+
"SPI_CS": "D10"
174174
}
175175
}
176176
}

targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/gpio_api.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,21 @@
2727

2828
uint32_t gpio_set(PinName pin)
2929
{
30-
pin_function(pin, 0);
31-
return (1);
30+
pin_function(pin, 0);
31+
return (1);
3232
}
3333

3434
// function to initialise the gpio pin
3535
// this links the board control bits for each pin
3636
// with the object created for the pin
3737
void gpio_init(gpio_t *obj, PinName pin)
3838
{
39-
MBED_ASSERT(pin != (PinName)NC);
39+
obj->pin = pin;
40+
if (pin == (PinName)NC)
41+
return;
42+
4043
unsigned long gpio_base = (unsigned long)pinmap_peripheral(pin, PinMap_GPIO);
4144
obj->baseAddr = gpio_base;
42-
obj->pin = pin;
4345
obj->pin_mask = 1<<(pinmap_find_function(pin, PinMap_GPIO)%8);
4446

4547
// determine PRCM GPIO CLOCK index

0 commit comments

Comments
 (0)