dim2_errors.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * dim2_errors.h - Definitions of errors for DIM2 HAL API
  3. * (MediaLB, Device Interface Macro IP, OS62420)
  4. *
  5. * Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * This file is licensed under GPLv2.
  13. */
  14. #ifndef _MOST_DIM_ERRORS_H
  15. #define _MOST_DIM_ERRORS_H
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /**
  20. * MOST DIM errors.
  21. */
  22. enum dim_errors_t {
  23. /** Not an error */
  24. DIM_NO_ERROR = 0,
  25. /** Bad base address for DIM2 IP */
  26. DIM_INIT_ERR_DIM_ADDR = 0x10,
  27. /**< Bad MediaLB clock */
  28. DIM_INIT_ERR_MLB_CLOCK,
  29. /** Bad channel address */
  30. DIM_INIT_ERR_CHANNEL_ADDRESS,
  31. /** Out of DBR memory */
  32. DIM_INIT_ERR_OUT_OF_MEMORY,
  33. /** DIM API is called while DIM is not initialized successfully */
  34. DIM_ERR_DRIVER_NOT_INITIALIZED = 0x20,
  35. /**
  36. * Configuration does not respect hardware limitations
  37. * for isochronous or synchronous channels
  38. */
  39. DIM_ERR_BAD_CONFIG,
  40. /**
  41. * Buffer size does not respect hardware limitations
  42. * for isochronous or synchronous channels
  43. */
  44. DIM_ERR_BAD_BUFFER_SIZE,
  45. DIM_ERR_UNDERFLOW,
  46. DIM_ERR_OVERFLOW,
  47. };
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif /* _MOST_DIM_ERRORS_H */