2 * Author: Brendan Le Foll <brendan.le.foll@intel.com>
3 * Copyright © 2014 Intel Corporation
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to
7 * deal in the Software without restriction, including without limitation the
8 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 * sell copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
28 * This file defines the basic shared types for libmraa
29 * this file is different to common.h in that swig takes this as an input
37 * MRAA supported platform types
40 MRAA_INTEL_GALILEO_GEN1 = 0, /**< The Generation 1 Galileo platform (RevD) */
41 MRAA_INTEL_GALILEO_GEN2 = 1, /**< The Generation 2 Galileo platform (RevG/H) */
42 MRAA_INTEL_EDISON_FAB_C = 2, /**< The Intel Edison (FAB C) */
43 MRAA_INTEL_DE3815 = 3, /**< The Intel DE3815 Baytrail NUC */
44 MRAA_INTEL_MINNOWBOARD_MAX = 4, /**< The Intel Minnow Board Max */
46 MRAA_UNKNOWN_PLATFORM = 99 /**< An unknown platform type, typically will load INTEL_GALILEO_GEN1 */
53 MRAA_SUCCESS = 0, /**< Expected response */
54 MRAA_ERROR_FEATURE_NOT_IMPLEMENTED = 1, /**< Feature TODO */
55 MRAA_ERROR_FEATURE_NOT_SUPPORTED = 2, /**< Feature not supported by HW */
56 MRAA_ERROR_INVALID_VERBOSITY_LEVEL = 3, /**< Verbosity level wrong */
57 MRAA_ERROR_INVALID_PARAMETER = 4, /**< Parameter invalid */
58 MRAA_ERROR_INVALID_HANDLE = 5, /**< Handle invalid */
59 MRAA_ERROR_NO_RESOURCES = 6, /**< No resource of that type avail */
60 MRAA_ERROR_INVALID_RESOURCE = 7, /**< Resource invalid */
61 MRAA_ERROR_INVALID_QUEUE_TYPE = 8, /**< Queue type incorrect */
62 MRAA_ERROR_NO_DATA_AVAILABLE = 9, /**< No data available */
63 MRAA_ERROR_INVALID_PLATFORM = 10, /**< Platform not recognised */
64 MRAA_ERROR_PLATFORM_NOT_INITIALISED = 11, /**< Board information not initialised */
65 MRAA_ERROR_PLATFORM_ALREADY_INITIALISED = 12, /**< Board is already initialised */
67 MRAA_ERROR_UNSPECIFIED = 99 /**< Unknown Error */
71 * This function attempts to set the mraa process to a given priority and the
72 * scheduler to SCHED_RR. Highest * priority is typically 99 and minimum is 0.
73 * This function * will set to MAX if * priority is > MAX. Function will return
76 * @param priority Value from typically 0 to 99
77 * @return The priority value set
79 int mraa_set_priority(const unsigned int priority);
81 /** Get the version string of mraa autogenerated from git tag
83 * The version returned may not be what is expected however it is a reliable
84 * number associated with the git tag closest to that version at build time
86 * @return version string from version.h
88 const char* mraa_get_version();
91 * Print a textual representation of the mraa_result_t
93 * @param result the result to print
95 void mraa_result_print(mraa_result_t result);
98 * Get platform type, board must be initialised.
100 * @return mraa_platform_t Platform type enum
102 mraa_platform_t mraa_get_platform_type();