mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/analogout_api.c
- Revision:
- 227:7bd0639b8911
- Parent:
- 215:83cf97a28428
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/analogout_api.c Wed Jun 11 09:45:09 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/analogout_api.c Wed Jun 11 16:00:09 2014 +0100 @@ -25,13 +25,13 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "mbed_assert.h" #include "analogout_api.h" #if DEVICE_ANALOGOUT #include "cmsis.h" #include "pinmap.h" -#include "error.h" #define RANGE_12BIT (0xFFF) @@ -46,10 +46,7 @@ // Get the peripheral name (DAC_1, ...) from the pin and assign it to the object obj->dac = (DACName)pinmap_peripheral(pin, PinMap_DAC); - - if (obj->dac == (DACName)NC) { - error("DAC pin mapping failed"); - } + MBED_ASSERT(obj->dac != (DACName)NC); // Configure GPIO pinmap_pinout(pin, PinMap_DAC);