Projektarbeit Line Following Robot bei Prof. Chowanetz im WS22/23
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mmalomx_commands.h 3.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. Copyright (c) 2012, Broadcom Europe Ltd
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are met:
  6. * Redistributions of source code must retain the above copyright
  7. notice, this list of conditions and the following disclaimer.
  8. * Redistributions in binary form must reproduce the above copyright
  9. notice, this list of conditions and the following disclaimer in the
  10. documentation and/or other materials provided with the distribution.
  11. * Neither the name of the copyright holder nor the
  12. names of its contributors may be used to endorse or promote products
  13. derived from this software without specific prior written permission.
  14. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  15. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  16. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  17. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
  18. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  19. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  20. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  21. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  23. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. /** \file
  26. * OpenMAX IL adaptation layer for MMAL - Commands related functions
  27. */
  28. OMX_ERRORTYPE mmalomx_command_state_set(
  29. OMX_HANDLETYPE hComponent,
  30. OMX_STATETYPE state);
  31. OMX_ERRORTYPE mmalomx_command_port_mark(
  32. OMX_HANDLETYPE hComponent,
  33. OMX_U32 nPortIndex,
  34. OMX_PTR *pCmdData);
  35. OMX_ERRORTYPE mmalomx_command_port_flush(
  36. OMX_HANDLETYPE hComponent,
  37. OMX_U32 nPortIndex);
  38. OMX_ERRORTYPE mmalomx_command_port_enable(
  39. OMX_HANDLETYPE hComponent,
  40. OMX_U32 nPortIndex);
  41. OMX_ERRORTYPE mmalomx_command_port_disable(
  42. OMX_HANDLETYPE hComponent,
  43. OMX_U32 nPortIndex);
  44. #define MMALOMX_ACTION_ENABLE 0x01
  45. #define MMALOMX_ACTION_DISABLE 0x02
  46. #define MMALOMX_ACTION_FLUSH 0x04
  47. #define MMALOMX_ACTION_PENDING_ENABLE 0x010
  48. #define MMALOMX_ACTION_PENDING_DISABLE 0x020
  49. #define MMALOMX_ACTION_PENDING_FLUSH 0x040
  50. #define MMALOMX_ACTION_CHECK_ALLOCATED 0x0100
  51. #define MMALOMX_ACTION_CHECK_DEALLOCATED 0x0200
  52. #define MMALOMX_ACTION_CHECK_FLUSHED 0x0400
  53. #define MMALOMX_ACTION_NOTIFY_DISABLE 0x1000
  54. #define MMALOMX_ACTION_NOTIFY_ENABLE 0x2000
  55. #define MMALOMX_ACTION_NOTIFY_FLUSH 0x4000
  56. #define MMALOMX_ACTION_NOTIFY_STATE 0x8000
  57. #define MMALOMX_COMMAND_EXIT 0
  58. #define MMALOMX_COMMAND_STATE_SET 1
  59. #define MMALOMX_COMMAND_PORT_MARK 2
  60. #define MMALOMX_COMMAND_PORT_FLUSH 3
  61. #define MMALOMX_COMMAND_PORT_ENABLE 4
  62. #define MMALOMX_COMMAND_PORT_DISABLE 5
  63. OMX_ERRORTYPE mmalomx_command_queue(
  64. MMALOMX_COMPONENT_T *component, OMX_U32 arg1, OMX_U32 arg2);
  65. OMX_ERRORTYPE mmalomx_command_dequeue(
  66. MMALOMX_COMPONENT_T *component, OMX_U32 *arg1, OMX_U32 *arg2);
  67. void mmalomx_commands_actions_check(MMALOMX_COMPONENT_T *component);
  68. void mmalomx_commands_actions_signal(MMALOMX_COMPONENT_T *component);
  69. void mmalomx_commands_actions_next(MMALOMX_COMPONENT_T *component);