mirror of https://github.com/ARMmbed/mbed-os.git
pinmap_peripheral: update error code
parent
31114ba343
commit
78ef24dd34
|
@ -74,7 +74,7 @@ uint32_t pinmap_peripheral(PinName pin, const PinMap *map)
|
||||||
}
|
}
|
||||||
peripheral = pinmap_find_peripheral(pin, map);
|
peripheral = pinmap_find_peripheral(pin, map);
|
||||||
if ((uint32_t)NC == peripheral) { // no mapping available
|
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;
|
return peripheral;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ uint32_t pinmap_function(PinName pin, const PinMap *map)
|
||||||
}
|
}
|
||||||
function = pinmap_find_function(pin, map);
|
function = pinmap_find_function(pin, map);
|
||||||
if ((uint32_t)NC == function) { // no mapping available
|
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;
|
return function;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue