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.

mmal_parameters.h 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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. #ifndef MMAL_PARAMETERS_H
  26. #define MMAL_PARAMETERS_H
  27. #include "mmal_common.h"
  28. #include "mmal_parameters_camera.h"
  29. #include "mmal_parameters_video.h"
  30. #include "mmal_parameters_audio.h"
  31. #include "mmal_parameters_clock.h"
  32. /** \defgroup MmalParameters List of pre-defined parameters
  33. * This defines a list of standard parameters. Components can define proprietary
  34. * parameters by creating a new group and defining their own structures. */
  35. /* @{ */
  36. /** Generic unsigned 64-bit integer parameter type. */
  37. typedef struct MMAL_PARAMETER_UINT64_T
  38. {
  39. MMAL_PARAMETER_HEADER_T hdr;
  40. uint64_t value; /**< Parameter value */
  41. } MMAL_PARAMETER_UINT64_T;
  42. /** Generic signed 64-bit integer parameter type. */
  43. typedef struct MMAL_PARAMETER_INT64_T
  44. {
  45. MMAL_PARAMETER_HEADER_T hdr;
  46. int64_t value; /**< Parameter value */
  47. } MMAL_PARAMETER_INT64_T;
  48. /** Generic unsigned 32-bit integer parameter type. */
  49. typedef struct MMAL_PARAMETER_UINT32_T
  50. {
  51. MMAL_PARAMETER_HEADER_T hdr;
  52. uint32_t value; /**< Parameter value */
  53. } MMAL_PARAMETER_UINT32_T;
  54. /** Generic signed 32-bit integer parameter type. */
  55. typedef struct MMAL_PARAMETER_INT32_T
  56. {
  57. MMAL_PARAMETER_HEADER_T hdr;
  58. int32_t value; /**< Parameter value */
  59. } MMAL_PARAMETER_INT32_T;
  60. /** Generic rational parameter type. */
  61. typedef struct MMAL_PARAMETER_RATIONAL_T {
  62. MMAL_PARAMETER_HEADER_T hdr;
  63. MMAL_RATIONAL_T value; /**< Parameter value */
  64. } MMAL_PARAMETER_RATIONAL_T;
  65. /** Generic boolean parameter type. */
  66. typedef struct MMAL_PARAMETER_BOOLEAN_T
  67. {
  68. MMAL_PARAMETER_HEADER_T hdr;
  69. MMAL_BOOL_T enable; /**< Parameter value */
  70. } MMAL_PARAMETER_BOOLEAN_T;
  71. /** Generic string parameter type. */
  72. typedef struct MMAL_PARAMETER_STRING_T
  73. {
  74. MMAL_PARAMETER_HEADER_T hdr;
  75. char str[1]; /**< Null-terminated string */
  76. } MMAL_PARAMETER_STRING_T;
  77. /** Generic array of bytes parameter type. */
  78. typedef struct MMAL_PARAMETER_BYTES_T
  79. {
  80. MMAL_PARAMETER_HEADER_T hdr;
  81. uint8_t data[1]; /**< Array of bytes */
  82. } MMAL_PARAMETER_BYTES_T;
  83. /** The value 1 in 16.16 fixed point form */
  84. #define MMAL_FIXED_16_16_ONE (1 << 16)
  85. /** Generic two-dimensional scaling factor type. */
  86. typedef struct MMAL_PARAMETER_SCALEFACTOR_T
  87. {
  88. MMAL_PARAMETER_HEADER_T hdr;
  89. MMAL_FIXED_16_16_T scale_x; /**< Scaling factor in X-axis */
  90. MMAL_FIXED_16_16_T scale_y; /**< Scaling factor in Y-axis */
  91. } MMAL_PARAMETER_SCALEFACTOR_T;
  92. /** Valid mirror modes */
  93. typedef enum MMAL_PARAM_MIRROR_T
  94. {
  95. MMAL_PARAM_MIRROR_NONE,
  96. MMAL_PARAM_MIRROR_VERTICAL,
  97. MMAL_PARAM_MIRROR_HORIZONTAL,
  98. MMAL_PARAM_MIRROR_BOTH,
  99. } MMAL_PARAM_MIRROR_T;
  100. /** Generic mirror parameter type */
  101. typedef struct MMAL_PARAMETER_MIRROR_T
  102. {
  103. MMAL_PARAMETER_HEADER_T hdr;
  104. MMAL_PARAM_MIRROR_T value; /**< Mirror mode */
  105. } MMAL_PARAMETER_MIRROR_T;
  106. /** URI parameter type.
  107. * The parameter may hold an arbitrary length, nul-terminated string as long
  108. * as the size is set appropriately.
  109. */
  110. typedef struct MMAL_PARAMETER_URI_T
  111. {
  112. MMAL_PARAMETER_HEADER_T hdr;
  113. char uri[1]; /**< URI string (null-terminated) */
  114. } MMAL_PARAMETER_URI_T;
  115. /** Generic encoding parameter type.
  116. * The parameter may hold more than one encoding by overriding the size to
  117. * include a bigger array.
  118. */
  119. typedef struct MMAL_PARAMETER_ENCODING_T
  120. {
  121. MMAL_PARAMETER_HEADER_T hdr;
  122. uint32_t encoding[1]; /**< Array of FourCC encodings, see \ref MmalEncodings */
  123. } MMAL_PARAMETER_ENCODING_T;
  124. /** Generic frame-rate parameter type.
  125. * Frame rates are specified as a rational number, using a pair of integers.
  126. * Since there can be many valid pairs for the same ratio, a frame-rate may
  127. * not contain exactly the same pairs of values when read back as it was
  128. * when set.
  129. */
  130. typedef struct MMAL_PARAMETER_FRAME_RATE_T {
  131. MMAL_PARAMETER_HEADER_T hdr;
  132. MMAL_RATIONAL_T frame_rate; /**< Frame-rate value */
  133. } MMAL_PARAMETER_FRAME_RATE_T;
  134. /** Generic configuration-file setup type.
  135. * Configuration files are transferred in small chunks. The component can
  136. * save all the chunks into a buffer, then process the entire file later.
  137. * This parameter initialises a config file to have the given size.
  138. */
  139. typedef struct MMAL_PARAMETER_CONFIGFILE_T {
  140. MMAL_PARAMETER_HEADER_T hdr;
  141. uint32_t file_size; /**< Size of complete file data */
  142. } MMAL_PARAMETER_CONFIGFILE_T;
  143. /** Generic configuration-file chunk data type.
  144. * Once a config file has been initialised, this parameter can be used to
  145. * write an arbitrary chunk of the file data (limited by the maximum MMAL
  146. * message size).
  147. */
  148. typedef struct MMAL_PARAMETER_CONFIGFILE_CHUNK_T {
  149. MMAL_PARAMETER_HEADER_T hdr;
  150. uint32_t size; /**< Number of bytes being transferred in this chunk */
  151. uint32_t offset; /**< Offset of this chunk in the file */
  152. char data[1]; /**< Chunk data */
  153. } MMAL_PARAMETER_CONFIGFILE_CHUNK_T;
  154. /* @} */
  155. #endif /* MMAL_PARAMETERS_H */