Greg Steiert / pegasus_dev

Dependents:   blinky_max32630fthr

Committer:
switches
Date:
Fri Dec 16 16:27:57 2016 +0000
Revision:
3:1198227e6421
Parent:
0:5c4d7b2438d3
Changed ADC scale for MAX32625 platforms to 1.2V full scale to match MAX32630 platforms

Who changed what in which revision?

UserRevisionLine numberNew contents of line
switches 0:5c4d7b2438d3 1 /**
switches 0:5c4d7b2438d3 2 * @file
switches 0:5c4d7b2438d3 3 * Error Management module
switches 0:5c4d7b2438d3 4 *
switches 0:5c4d7b2438d3 5 */
switches 0:5c4d7b2438d3 6
switches 0:5c4d7b2438d3 7 /*
switches 0:5c4d7b2438d3 8 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
switches 0:5c4d7b2438d3 9 * All rights reserved.
switches 0:5c4d7b2438d3 10 *
switches 0:5c4d7b2438d3 11 * Redistribution and use in source and binary forms, with or without modification,
switches 0:5c4d7b2438d3 12 * are permitted provided that the following conditions are met:
switches 0:5c4d7b2438d3 13 *
switches 0:5c4d7b2438d3 14 * 1. Redistributions of source code must retain the above copyright notice,
switches 0:5c4d7b2438d3 15 * this list of conditions and the following disclaimer.
switches 0:5c4d7b2438d3 16 * 2. Redistributions in binary form must reproduce the above copyright notice,
switches 0:5c4d7b2438d3 17 * this list of conditions and the following disclaimer in the documentation
switches 0:5c4d7b2438d3 18 * and/or other materials provided with the distribution.
switches 0:5c4d7b2438d3 19 * 3. The name of the author may not be used to endorse or promote products
switches 0:5c4d7b2438d3 20 * derived from this software without specific prior written permission.
switches 0:5c4d7b2438d3 21 *
switches 0:5c4d7b2438d3 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
switches 0:5c4d7b2438d3 23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
switches 0:5c4d7b2438d3 24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
switches 0:5c4d7b2438d3 25 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
switches 0:5c4d7b2438d3 26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
switches 0:5c4d7b2438d3 27 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
switches 0:5c4d7b2438d3 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
switches 0:5c4d7b2438d3 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
switches 0:5c4d7b2438d3 30 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
switches 0:5c4d7b2438d3 31 * OF SUCH DAMAGE.
switches 0:5c4d7b2438d3 32 *
switches 0:5c4d7b2438d3 33 * This file is part of the lwIP TCP/IP stack.
switches 0:5c4d7b2438d3 34 *
switches 0:5c4d7b2438d3 35 * Author: Adam Dunkels <adam@sics.se>
switches 0:5c4d7b2438d3 36 *
switches 0:5c4d7b2438d3 37 */
switches 0:5c4d7b2438d3 38
switches 0:5c4d7b2438d3 39 #include "lwip/err.h"
switches 0:5c4d7b2438d3 40
switches 0:5c4d7b2438d3 41 #ifdef LWIP_DEBUG
switches 0:5c4d7b2438d3 42
switches 0:5c4d7b2438d3 43 static const char *err_strerr[] = {
switches 0:5c4d7b2438d3 44 "Ok.", /* ERR_OK 0 */
switches 0:5c4d7b2438d3 45 "Out of memory error.", /* ERR_MEM -1 */
switches 0:5c4d7b2438d3 46 "Buffer error.", /* ERR_BUF -2 */
switches 0:5c4d7b2438d3 47 "Timeout.", /* ERR_TIMEOUT -3 */
switches 0:5c4d7b2438d3 48 "Routing problem.", /* ERR_RTE -4 */
switches 0:5c4d7b2438d3 49 "Operation in progress.", /* ERR_INPROGRESS -5 */
switches 0:5c4d7b2438d3 50 "Illegal value.", /* ERR_VAL -6 */
switches 0:5c4d7b2438d3 51 "Operation would block.", /* ERR_WOULDBLOCK -7 */
switches 0:5c4d7b2438d3 52 "Address in use.", /* ERR_USE -8 */
switches 0:5c4d7b2438d3 53 "Already connecting.", /* ERR_ALREADY -9 */
switches 0:5c4d7b2438d3 54 "Already connected.", /* ERR_ISCONN -10 */
switches 0:5c4d7b2438d3 55 "Not connected.", /* ERR_CONN -11 */
switches 0:5c4d7b2438d3 56 "Low-level netif error.", /* ERR_IF -12 */
switches 0:5c4d7b2438d3 57 "Connection aborted.", /* ERR_ABRT -13 */
switches 0:5c4d7b2438d3 58 "Connection reset.", /* ERR_RST -14 */
switches 0:5c4d7b2438d3 59 "Connection closed.", /* ERR_CLSD -15 */
switches 0:5c4d7b2438d3 60 "Illegal argument." /* ERR_ARG -16 */
switches 0:5c4d7b2438d3 61 };
switches 0:5c4d7b2438d3 62
switches 0:5c4d7b2438d3 63 /**
switches 0:5c4d7b2438d3 64 * Convert an lwip internal error to a string representation.
switches 0:5c4d7b2438d3 65 *
switches 0:5c4d7b2438d3 66 * @param err an lwip internal err_t
switches 0:5c4d7b2438d3 67 * @return a string representation for err
switches 0:5c4d7b2438d3 68 */
switches 0:5c4d7b2438d3 69 const char *
switches 0:5c4d7b2438d3 70 lwip_strerr(err_t err)
switches 0:5c4d7b2438d3 71 {
switches 0:5c4d7b2438d3 72 return err_strerr[-err];
switches 0:5c4d7b2438d3 73 }
switches 0:5c4d7b2438d3 74
switches 0:5c4d7b2438d3 75 #endif /* LWIP_DEBUG */