Implement a secure ICS protocol targeting LoRa Node151 microcontroller for controlling irrigation.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

84 wiersze
2.8 KiB

  1. /**
  2. * \file
  3. *
  4. * \brief Error code definitions.
  5. *
  6. * This file defines various status codes returned by functions,
  7. * indicating success or failure as well as what kind of failure.
  8. *
  9. * Copyright (C) 2015 Atmel Corporation. All rights reserved.
  10. *
  11. * \asf_license_start
  12. *
  13. * \page License
  14. *
  15. * Redistribution and use in source and binary forms, with or without
  16. * modification, are permitted provided that the following conditions are met:
  17. *
  18. * 1. Redistributions of source code must retain the above copyright notice,
  19. * this list of conditions and the following disclaimer.
  20. *
  21. * 2. Redistributions in binary form must reproduce the above copyright notice,
  22. * this list of conditions and the following disclaimer in the documentation
  23. * and/or other materials provided with the distribution.
  24. *
  25. * 3. The name of Atmel may not be used to endorse or promote products derived
  26. * from this software without specific prior written permission.
  27. *
  28. * 4. This software may only be redistributed and used in connection with an
  29. * Atmel microcontroller product.
  30. *
  31. * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
  32. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  33. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
  34. * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
  35. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  36. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  37. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  38. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  39. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  40. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  41. * POSSIBILITY OF SUCH DAMAGE.
  42. *
  43. * \asf_license_stop
  44. *
  45. */
  46. #ifndef ERROR_CODES_H_INCLUDED
  47. #define ERROR_CODES_H_INCLUDED
  48. #define ERR_NONE 0
  49. #define ERR_INVALID_DATA -1
  50. #define ERR_NO_CHANGE -2
  51. #define ERR_ABORTED -3
  52. #define ERR_BUSY -4
  53. #define ERR_SUSPEND -5
  54. #define ERR_IO -6
  55. #define ERR_REQ_FLUSHED -7
  56. #define ERR_TIMEOUT -8
  57. #define ERR_BAD_DATA -9
  58. #define ERR_NOT_FOUND -10
  59. #define ERR_UNSUPPORTED_DEV -11
  60. #define ERR_NO_MEMORY -12
  61. #define ERR_INVALID_ARG -13
  62. #define ERR_BAD_ADDRESS -14
  63. #define ERR_BAD_FORMAT -15
  64. #define ERR_BAD_FRQ -16
  65. #define ERR_DENIED -17
  66. #define ERR_ALREADY_INITIALIZED -18
  67. #define ERR_OVERFLOW -19
  68. #define ERR_NOT_INITIALIZED -20
  69. #define ERR_SAMPLERATE_UNAVAILABLE -21
  70. #define ERR_RESOLUTION_UNAVAILABLE -22
  71. #define ERR_BAUDRATE_UNAVAILABLE -23
  72. #define ERR_PACKET_COLLISION -24
  73. #define ERR_PROTOCOL -25
  74. #define ERR_PIN_MUX_INVALID -26
  75. #define ERR_UNSUPPORTED_OP -27
  76. #define ERR_NO_RESOURCE -28
  77. #define ERR_NOT_READY -29
  78. #define ERR_FAILURE -30
  79. #define ERR_WRONG_LENGTH -31
  80. #endif