diff --git a/components/storage/blockdevice/COMPONENT_SD/mbed_lib.json b/components/storage/blockdevice/COMPONENT_SD/mbed_lib.json index 6eda90f6eeb..f78a057cf27 100644 --- a/components/storage/blockdevice/COMPONENT_SD/mbed_lib.json +++ b/components/storage/blockdevice/COMPONENT_SD/mbed_lib.json @@ -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" } } } diff --git a/targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/gpio_api.c b/targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/gpio_api.c index 4c17e2956d0..5a8f73d94aa 100644 --- a/targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/gpio_api.c +++ b/targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/gpio_api.c @@ -27,8 +27,8 @@ uint32_t gpio_set(PinName pin) { - pin_function(pin, 0); - return (1); + pin_function(pin, 0); + return (1); } // function to initialise the gpio pin @@ -36,10 +36,12 @@ uint32_t gpio_set(PinName 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