2014-05-30 10:28:21 +01:00
|
|
|
#ifdef DOXYGEN
|
2014-06-11 14:17:34 +01:00
|
|
|
%include common_doc.i
|
2014-05-30 10:28:21 +01:00
|
|
|
%include gpio_class_doc.i
|
|
|
|
|
%include i2c_class_doc.i
|
|
|
|
|
%include pwm_class_doc.i
|
|
|
|
|
%include aio_class_doc.i
|
|
|
|
|
%include spi_class_doc.i
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-04-10 16:53:19 +01:00
|
|
|
%{
|
2014-06-11 14:17:34 +01:00
|
|
|
#include "common.h"
|
2014-05-16 11:56:06 +01:00
|
|
|
#include "gpio.hpp"
|
2014-05-16 11:53:19 +01:00
|
|
|
#include "pwm.hpp"
|
2014-05-16 10:28:26 +01:00
|
|
|
#include "i2c.hpp"
|
2014-05-16 14:10:29 +01:00
|
|
|
#include "spi.hpp"
|
2014-05-15 22:47:38 +01:00
|
|
|
#include "aio.hpp"
|
2014-04-10 16:53:19 +01:00
|
|
|
%}
|
|
|
|
|
|
2014-05-07 17:39:58 +01:00
|
|
|
%init %{
|
2014-05-13 20:45:00 +00:00
|
|
|
//Adding maa_init() to the module initialisation process
|
2014-05-07 17:39:58 +01:00
|
|
|
maa_init();
|
|
|
|
|
%}
|
|
|
|
|
|
2014-05-19 09:51:31 +01:00
|
|
|
%rename(getVersion) maa_get_version();
|
2014-05-02 09:52:06 +01:00
|
|
|
const char * maa_get_version();
|
2014-05-01 15:27:34 +01:00
|
|
|
|
2014-06-04 14:39:41 +01:00
|
|
|
%rename(setPriority) maa_set_priority;
|
|
|
|
|
int maa_set_priority(const unsigned int);
|
|
|
|
|
|
2014-05-19 11:47:38 +01:00
|
|
|
%rename(printError) maa_result_print(maa_result_t error);
|
|
|
|
|
void maa_result_print(maa_result_t error);
|
2014-05-01 15:42:42 +01:00
|
|
|
|
2014-05-19 09:58:01 +01:00
|
|
|
/**
|
|
|
|
|
* MAA return codes
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
MAA_SUCCESS = 0, /**< Expected response */
|
|
|
|
|
MAA_ERROR_FEATURE_NOT_IMPLEMENTED = 1, /**< Feature TODO */
|
|
|
|
|
MAA_ERROR_FEATURE_NOT_SUPPORTED = 2, /**< Feature not supported by HW */
|
|
|
|
|
MAA_ERROR_INVALID_VERBOSITY_LEVEL = 3, /**< Verbosity level wrong */
|
|
|
|
|
MAA_ERROR_INVALID_PARAMETER = 4, /**< Parameter invalid */
|
|
|
|
|
MAA_ERROR_INVALID_HANDLE = 5, /**< Handle invalid */
|
|
|
|
|
MAA_ERROR_NO_RESOURCES = 6, /**< No resource of that type avail */
|
|
|
|
|
MAA_ERROR_INVALID_RESOURCE = 7, /**< Resource invalid */
|
|
|
|
|
MAA_ERROR_INVALID_QUEUE_TYPE = 8, /**< Queue type incorrect */
|
|
|
|
|
MAA_ERROR_NO_DATA_AVAILABLE = 9, /**< No data available */
|
|
|
|
|
MAA_ERROR_INVALID_PLATFORM = 10, /**< Platform not recognised */
|
|
|
|
|
MAA_ERROR_PLATFORM_NOT_INITIALISED = 11, /**< Board information not initialised */
|
|
|
|
|
MAA_ERROR_PLATFORM_ALREADY_INITIALISED = 12, /**< Board is already initialised */
|
|
|
|
|
|
|
|
|
|
MAA_ERROR_UNSPECIFIED = 99 /**< Unknown Error */
|
|
|
|
|
} maa_result_t;
|
|
|
|
|
|
2014-06-13 10:30:01 +01:00
|
|
|
%typemap(in) unsigned char* = char*;
|
|
|
|
|
|
2014-05-19 09:49:30 +01:00
|
|
|
#### GPIO ####
|
2014-05-16 14:28:59 +01:00
|
|
|
|
2014-05-16 11:56:06 +01:00
|
|
|
%include "gpio.hpp"
|
2014-05-01 15:42:42 +01:00
|
|
|
|
|
|
|
|
#### i2c ####
|
|
|
|
|
|
2014-05-16 10:28:26 +01:00
|
|
|
%include "i2c.hpp"
|
2014-05-01 15:42:42 +01:00
|
|
|
|
|
|
|
|
#### PWM ####
|
|
|
|
|
|
2014-05-16 11:53:19 +01:00
|
|
|
%include "pwm.hpp"
|
2014-05-01 15:42:42 +01:00
|
|
|
|
|
|
|
|
#### SPI ####
|
|
|
|
|
|
2014-05-16 14:10:29 +01:00
|
|
|
%include "spi.hpp"
|
2014-05-01 16:59:54 +01:00
|
|
|
|
|
|
|
|
#### AIO ####
|
|
|
|
|
|
2014-05-15 22:47:38 +01:00
|
|
|
%include "aio.hpp"
|