Merge pull request #11627 from jeromecoutant/PR_PINMAP_ERROR

pinmap_peripheral function: update error code for easier debug
pull/11649/head
Martin Kojtal 2019-10-14 09:27:30 +02:00 committed by GitHub
commit 3ca2e14a71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ uint32_t pinmap_peripheral(PinName pin, const PinMap *map)
}
peripheral = pinmap_find_peripheral(pin, map);
if ((uint32_t)NC == peripheral) { // no mapping available
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_PINMAP_INVALID), "pinmap not found for peripheral", peripheral);
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_PINMAP_INVALID), "pinmap not found for peripheral", pin);
}
return peripheral;
}
@ -99,7 +99,7 @@ uint32_t pinmap_function(PinName pin, const PinMap *map)
}
function = pinmap_find_function(pin, map);
if ((uint32_t)NC == function) { // no mapping available
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_PINMAP_INVALID), "pinmap not found for function", function);
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_PINMAP_INVALID), "pinmap not found for function", pin);
}
return function;
}