Private
Public Access
2
0

Travis CI and Documentation Generation improvements

* Use docker images from docker hub instead of building them on Travis
* Fix doxygen warnings for C/C++ Documentation
* Fix examples inclusion in documentation
* Modify Travis build matrix to include stages and additional jobs
* Update doxygen2jsdoc submodule
* Add doxyport submodule
* Generate documentation for each language in Travis
* Add sonar.java.binaries to sonar-scan.sh

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
This commit is contained in:
Nicolas Oliver
2017-07-28 10:48:48 -03:00
parent 14bf91af44
commit e0a1862ce3
51 changed files with 486 additions and 434 deletions

View File

@@ -1,4 +0,0 @@
Dockerfile
docker-compose.yaml
.scannerwork/
.vscode/

6
.gitmodules vendored
View File

@@ -1,4 +1,8 @@
[submodule "doxygen2jsdoc"] [submodule "doxygen2jsdoc"]
path = doxygen2jsdoc path = doxygen2jsdoc
url = https://github.com/arfoll/doxygen2jsdoc.git url = https://github.com/intel-iot-devkit/doxygen2jsdoc.git
branch = master
[submodule "doxyport"]
path = doxyport
url = https://github.com/intel-iot-devkit/doxyport.git
branch = master branch = master

View File

@@ -3,54 +3,6 @@ sudo: required
language: cpp language: cpp
compiler:
- clang
- gcc
env:
- TARGET=doc
- TARGET=python2
- TARGET=python3
- TARGET=java
- TARGET=node4
- TARGET=node5
- TARGET=android
- TARGET=sonar-scan
- JSONPLAT=ON TARGET=python2
- JSONPLAT=ON TARGET=python3
- JSONPLAT=ON TARGET=java
- JSONPLAT=ON TARGET=node4
- JSONPLAT=ON TARGET=node5
- BUILDARCH=MOCK TARGET=python2
- BUILDARCH=MOCK TARGET=python3
- BUILDARCH=MOCK TARGET=java
- BUILDARCH=MOCK TARGET=node4
- BUILDARCH=MOCK TARGET=node5
matrix:
exclude:
- compiler: clang
env: TARGET=java
- compiler: clang
env: JSONPLAT=ON TARGET=java
- compiler: clang
env: BUILDARCH=MOCK TARGET=java
- compiler: gcc
env: TARGET=android
- compiler: clang
env: TARGET=sonar-scan
allow_failures:
- compiler: gcc
env: JSONPLAT=ON TARGET=node4
- compiler: clang
env: JSONPLAT=ON TARGET=node4
- compiler: gcc
env: JSONPLAT=ON TARGET=node5
- compiler: clang
env: JSONPLAT=ON TARGET=node5
- compiler: gcc
env: TARGET=sonar-scan
services: services:
- docker - docker
@@ -60,14 +12,90 @@ before_install:
- chmod +x docker-compose - chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin - sudo mv docker-compose /usr/local/bin
before_script: jobs:
- if [ "$CC" == "gcc" ]; then export CC=gcc-4.8; fi fast_finish: true
- if [ "$CXX" == "g++" ]; then export CXX=g++-4.8; fi allow_failures:
- if [ "$CC" == "clang" ]; then export CC=clang-3.8; fi - env: TARGET=sonar-scan
- if [ "$CXX" == "clang++" ]; then export CXX=clang++-3.8; fi - env: TARGET=ipk
- docker-compose build base - env: TARGET=rpm
- if [ "$TARGET" == "android" ]; then docker-compose build java; fi include:
- docker-compose build ${TARGET} - &run-with-clang
stage: Clang 3.8
env: TARGET=python2
before_script: docker-compose pull ${TARGET}
script: script:
- export CC=clang-3.8 CXX=clang++-3.8
- docker-compose run ${TARGET} - docker-compose run ${TARGET}
- BUILDARCH=MOCK docker-compose run ${TARGET}
- if [[ ${TARGET} != *"node"* ]]; then JSONPLAT=ON docker-compose run ${TARGET}; fi
- <<: *run-with-clang
env: TARGET=python3
- <<: *run-with-clang
env: TARGET=node4
- <<: *run-with-clang
env: TARGET=node5
- <<: *run-with-clang
env: TARGET=node6
- <<: *run-with-clang
env: TARGET=java
- &run-with-gcc-5
stage: Gcc 5
env: TARGET=python2
before_script: docker-compose pull ${TARGET}
script:
- export CC=gcc-5 CXX=g++-5
- docker-compose run ${TARGET}
- BUILDARCH=MOCK docker-compose run ${TARGET}
- if [[ ${TARGET} != *"node"* ]]; then JSONPLAT=ON docker-compose run ${TARGET}; fi
- <<: *run-with-gcc-5
env: TARGET=python3
- <<: *run-with-gcc-5
env: TARGET=node4
- <<: *run-with-gcc-5
env: TARGET=node5
- <<: *run-with-gcc-5
env: TARGET=node6
- <<: *run-with-gcc-5
env: TARGET=java
- &run-with-gcc-6
stage: Gcc 6
env: TARGET=python2
before_script: docker-compose pull ${TARGET}
script:
- export CC=gcc-6 CXX=g++-6
- docker-compose run ${TARGET}
- BUILDARCH=MOCK docker-compose run ${TARGET}
- if [[ ${TARGET} != *"node"* ]]; then JSONPLAT=ON docker-compose run ${TARGET}; fi
- <<: *run-with-gcc-6
env: TARGET=python3
- <<: *run-with-gcc-6
env: TARGET=node4
- <<: *run-with-gcc-6
env: TARGET=node5
- <<: *run-with-gcc-6
env: TARGET=node6
- <<: *run-with-gcc-6
env: TARGET=java
- &run-additional-jobs
stage: Additional Jobs
env: TARGET=doc
before_script: docker-compose pull ${TARGET}
script:
- export CC=clang-3.8 CXX=clang++-3.8
- docker-compose run ${TARGET}
- <<: *run-additional-jobs
env: TARGET=android
- <<: *run-additional-jobs
env: TARGET=usbplat
- <<: *run-additional-jobs
env: TARGET=firmata
- <<: *run-additional-jobs
env: TARGET=imraa
- <<: *run-additional-jobs
env: TARGET=ftdi4442
- <<: *run-additional-jobs
env: TARGET=ipk
- <<: *run-additional-jobs
env: TARGET=rpm
- <<: *run-additional-jobs
env: TARGET=sonar-scan

View File

@@ -832,7 +832,7 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is # Note that relative paths are relative to the directory from which doxygen is
# run. # run.
EXCLUDE = EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/docs/index.java.md
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded # directories that are symbolic links (a Unix file system feature) are excluded

View File

@@ -756,10 +756,9 @@ WARN_LOGFILE =
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/api/ \ INPUT = @CMAKE_CURRENT_SOURCE_DIR@/api/ \
@CMAKE_CURRENT_SOURCE_DIR@/api/mraa/ \ @CMAKE_CURRENT_SOURCE_DIR@/api/mraa/ \
@CMAKE_CURRENT_SOURCE_DIR@/docs/ \ @CMAKE_CURRENT_SOURCE_DIR@/docs/ \
@CMAKE_CURRENT_SOURCE_DIR@/docs/CONTRIBUTING.md \ @CMAKE_CURRENT_SOURCE_DIR@/CONTRIBUTING.md \
@CMAKE_BINARY_DIR@/src/ \ @CMAKE_BINARY_DIR@/src/ \
@CMAKE_CURRENT_SOURCE_DIR@/docs/index.java.md \ @CMAKE_CURRENT_SOURCE_DIR@/docs/index.java.md
@CMAKE_CURRENT_SOURCE_DIR@/README.md
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -797,7 +796,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is # Note that relative paths are relative to the directory from which doxygen is
# run. # run.
EXCLUDE = EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/docs/index.md
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded # directories that are symbolic links (a Unix file system feature) are excluded
@@ -1810,18 +1809,6 @@ GENERATE_XML = YES
XML_OUTPUT = xml XML_OUTPUT = xml
# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
# validating XML parser to check the syntax of the XML files.
# This tag requires that the tag GENERATE_XML is set to YES.
XML_SCHEMA =
# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
# validating XML parser to check the syntax of the XML files.
# This tag requires that the tag GENERATE_XML is set to YES.
XML_DTD =
# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program # If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
# listings (including syntax highlighting and cross-referencing information) to # listings (including syntax highlighting and cross-referencing information) to
# the XML output. Note that enabling this will significantly increase the size # the XML output. Note that enabling this will significantly increase the size

View File

@@ -60,7 +60,7 @@ class Aio
* position. Check your board mapping for details. An arduino style layout * position. Check your board mapping for details. An arduino style layout
* will have A0 as pin14 but AIO0. * will have A0 as pin14 but AIO0.
* *
* @param void * to an AIO context * @param aio_context void * to an AIO context
*/ */
Aio(void* aio_context) Aio(void* aio_context)
{ {

View File

@@ -27,13 +27,19 @@
#include <stdint.h> #include <stdint.h>
#include "types.h" #include "types.h"
/** Max size off Mraa Platform name */
#define MRAA_PLATFORM_NAME_MAX_SIZE 64 #define MRAA_PLATFORM_NAME_MAX_SIZE 64
/** Size off Mraa pin name */
#define MRAA_PIN_NAME_SIZE 12 #define MRAA_PIN_NAME_SIZE 12
/** Bit Shift for Mraa sub platform */
#define MRAA_SUB_PLATFORM_BIT_SHIFT 9 #define MRAA_SUB_PLATFORM_BIT_SHIFT 9
/** Mask for Mraa sub platform */
#define MRAA_SUB_PLATFORM_MASK (1<<MRAA_SUB_PLATFORM_BIT_SHIFT) #define MRAA_SUB_PLATFORM_MASK (1<<MRAA_SUB_PLATFORM_BIT_SHIFT)
/** Mraa main platform offset */
#define MRAA_MAIN_PLATFORM_OFFSET 0 #define MRAA_MAIN_PLATFORM_OFFSET 0
/** Mraa sub platform offset */
#define MRAA_SUB_PLATFORM_OFFSET 1 #define MRAA_SUB_PLATFORM_OFFSET 1
/** Executes function func and returns its result in case of error /** Executes function func and returns its result in case of error
@@ -106,7 +112,7 @@ unsigned int mraa_adc_raw_bits();
/** /**
* Check the specified board's bit size when reading the value * Check the specified board's bit size when reading the value
* *
* @param specified platform offset; 0 for main platform, 1 foor sub platform * @param platform_offset specified platform offset; 0 for main platform, 1 for sub platform
* @return raw bits being read from kernel module. zero if no ADC * @return raw bits being read from kernel module. zero if no ADC
*/ */
unsigned int mraa_get_platform_adc_raw_bits(uint8_t platform_offset); unsigned int mraa_get_platform_adc_raw_bits(uint8_t platform_offset);
@@ -121,7 +127,7 @@ unsigned int mraa_adc_supported_bits();
/** /**
* Return value that the raw value should be shifted to. Zero if no ADC * Return value that the raw value should be shifted to. Zero if no ADC
* *
* @param specified platform offset; 0 for main platform, 1 foor sub platform * @param platform_offset specified platform offset; 0 for main platform, 1 for sub platform
* @return return actual bit size the adc value should be understood as. * @return return actual bit size the adc value should be understood as.
*/ */
unsigned int mraa_get_platform_adc_supported_bits(int platform_offset); unsigned int mraa_get_platform_adc_supported_bits(int platform_offset);
@@ -146,7 +152,7 @@ const char* mraa_get_platform_name();
* platform and can be NULL. platform_offset has to be given. Do not modify * platform and can be NULL. platform_offset has to be given. Do not modify
* this pointer * this pointer
* *
* @param specified platform offset; 0 for main platform, 1 for sub platform * @param platform_offset specified platform offset; 0 for main platform, 1 for sub platform
* @return platform's versioning string * @return platform's versioning string
*/ */
const char* mraa_get_platform_version(int platform_offset); const char* mraa_get_platform_version(int platform_offset);
@@ -255,7 +261,7 @@ int mraa_get_i2c_bus_id(int i2c_bus);
/** /**
* Get specified platform pincount, board must be initialised. * Get specified platform pincount, board must be initialised.
* *
* @param specified platform offset; 0 for main platform, 1 foor sub platform * @param platform_offset specified platform offset; 0 for main platform, 1 for sub platform
* @return uint of physical pin count on the in-use platform * @return uint of physical pin count on the in-use platform
*/ */
unsigned int mraa_get_platform_pin_count(uint8_t platform_offset); unsigned int mraa_get_platform_pin_count(uint8_t platform_offset);
@@ -326,7 +332,7 @@ mraa_boolean_t mraa_has_sub_platform();
/** /**
* Check if pin or bus id includes sub platform mask. * Check if pin or bus id includes sub platform mask.
* *
* @param int pin or bus number * @param pin_or_bus_id pin or bus number
* *
* @return mraa_boolean_t 1 if pin or bus is for sub platform, 0 otherwise * @return mraa_boolean_t 1 if pin or bus is for sub platform, 0 otherwise
*/ */
@@ -335,7 +341,7 @@ mraa_boolean_t mraa_is_sub_platform_id(int pin_or_bus_id);
/** /**
* Convert pin or bus index to corresponding sub platform id. * Convert pin or bus index to corresponding sub platform id.
* *
* @param int pin or bus index * @param pin_or_bus_index pin or bus index
* *
* @return int sub platform pin or bus number * @return int sub platform pin or bus number
*/ */
@@ -344,7 +350,7 @@ int mraa_get_sub_platform_id(int pin_or_bus_index);
/** /**
* Convert pin or bus sub platform id to index. * Convert pin or bus sub platform id to index.
* *
* @param int sub platform pin or bus id * @param pin_or_bus_id sub platform pin or bus id
* *
* @return int pin or bus index * @return int pin or bus index
*/ */
@@ -353,8 +359,8 @@ int mraa_get_sub_platform_index(int pin_or_bus_id);
/** /**
* Add mraa subplatform * Add mraa subplatform
* *
* @param subplatform type * @param subplatformtype subplatform type
* @param uart device subplatform is on * @param uart_dev uart device subplatform is on
* *
* @return mraa_result_t indicating success * @return mraa_result_t indicating success
*/ */
@@ -363,7 +369,7 @@ mraa_result_t mraa_add_subplatform(mraa_platform_t subplatformtype, const char*
/** /**
* Remove a mraa subplatform * Remove a mraa subplatform
* *
* @param subplatform type * @param subplatformtype subplatform type
* *
* @return mraa_result indicating success * @return mraa_result indicating success
*/ */
@@ -376,7 +382,7 @@ mraa_result_t mraa_remove_subplatform(mraa_platform_t subplatformtype);
* [io]-[raw]-[id]-[pin] * [io]-[raw]-[id]-[pin]
* [io]-[raw]-[path] * [io]-[raw]-[path]
* *
* @param IO description * @param desc IO description
* *
* @return void* to IO context or NULL * @return void* to IO context or NULL
*/ */
@@ -385,7 +391,7 @@ void* mraa_init_io(const char* desc);
/** /**
* Instantiate an unknown board using a json file * Instantiate an unknown board using a json file
* *
* @param Path to the json file, relative to the folder the program * @param path Path to the json file, relative to the folder the program
* was initially run in or a direct path * was initially run in or a direct path
* *
* @return mraa_result indicating success * @return mraa_result indicating success

View File

@@ -99,7 +99,7 @@ getPlatformType()
/** /**
* Print a textual representation of the mraa::Result * Print a textual representation of the mraa::Result
* *
* @param Result the Result to print * @param result the Result to print
*/ */
inline void inline void
printError(Result result) printError(Result result)
@@ -157,7 +157,7 @@ getPlatformName()
/** /**
* Return platform versioning info. Returns NULL if no info present. * Return platform versioning info. Returns NULL if no info present.
* *
* @param optional subplatform identifier * @param platform_offset optional subplatform identifier
* @return platform versioning info * @return platform versioning info
*/ */
inline std::string inline std::string
@@ -315,7 +315,7 @@ getPwmLookup(std::string pwm_name)
/** /**
* Get UART index by UART name, board must be initialised. * Get UART index by UART name, board must be initialised.
* *
* @param pwm_name: Name of the UART. Eg: UART2 * @param uart_name: Name of the UART. Eg: UART2
* @throws std::invalid_argument if name is not found * @throws std::invalid_argument if name is not found
* @return MRAA index for the UART * @return MRAA index for the UART
*/ */
@@ -360,7 +360,7 @@ hasSubPlatform()
/** /**
* Check if pin or bus id includes sub platform mask. * Check if pin or bus id includes sub platform mask.
* *
* @param int pin or bus number * @param pin_or_bus_id pin or bus number
* *
* @return mraa_boolean_t 1 if pin or bus is for sub platform, 0 otherwise * @return mraa_boolean_t 1 if pin or bus is for sub platform, 0 otherwise
*/ */
@@ -373,7 +373,7 @@ isSubPlatformId(int pin_or_bus_id)
/** /**
* Convert pin or bus index to corresponding sub platform id. * Convert pin or bus index to corresponding sub platform id.
* *
* @param int pin or bus index * @param pin_or_bus_index pin or bus index
* *
* @return int sub platform pin or bus number * @return int sub platform pin or bus number
*/ */
@@ -386,7 +386,7 @@ getSubPlatformId(int pin_or_bus_index)
/** /**
* Convert pin or bus sub platform id to index. * Convert pin or bus sub platform id to index.
* *
* @param int sub platform pin or bus id * @param pin_or_bus_id sub platform pin or bus id
* *
* @return int pin or bus index * @return int pin or bus index
*/ */
@@ -399,7 +399,7 @@ getSubPlatformIndex(int pin_or_bus_id)
/** /**
* Get default i2c bus, board must be initialised. * Get default i2c bus, board must be initialised.
* *
* @param optional subplatform identifier * @param platform_offset optional subplatform identifier
* @return default i2c bus for paltform * @return default i2c bus for paltform
*/ */
inline int inline int
@@ -422,6 +422,13 @@ addSubplatform(Platform subplatformtype, std::string uart_dev)
return (Result) mraa_add_subplatform((mraa_platform_t) subplatformtype, uart_dev.c_str()); return (Result) mraa_add_subplatform((mraa_platform_t) subplatformtype, uart_dev.c_str());
} }
/**
* Remove mraa subplatform
*
* @param subplatformtype the type of subplatform to remove
* (e.g. MRAA_GENERIC_FIRMATA)
* @return Result of operation
*/
inline Result inline Result
removeSubplatform(Platform subplatformtype) removeSubplatform(Platform subplatformtype)
{ {
@@ -435,7 +442,7 @@ removeSubplatform(Platform subplatformtype)
* [io]-[raw]-[id]-[pin] * [io]-[raw]-[id]-[pin]
* [io]-[raw]-[path] * [io]-[raw]-[path]
* *
* @param IO description * @param desc description
* *
* @return class T initialised using pointer to IO or NULL * @return class T initialised using pointer to IO or NULL
*/ */
@@ -449,7 +456,7 @@ initIo(std::string desc)
/** /**
* Instantiate an unknown board using a json file * Instantiate an unknown board using a json file
* *
* @param Path to the json file, relative to the folder the program * @param path Path to the json file, relative to the folder the program
* was initially run in or a direct path * was initially run in or a direct path
* *
* @return Result indicating success * @return Result indicating success

View File

@@ -52,7 +52,7 @@ typedef struct _firmata* mraa_firmata_context;
* Initialise firmata context on a feature. This feature is what will be * Initialise firmata context on a feature. This feature is what will be
* listened on if you request a response callback * listened on if you request a response callback
* *
* @param firmata feature * @param feature firmata feature
* @return firmata context or NULL * @return firmata context or NULL
*/ */
mraa_firmata_context mraa_firmata_init(int feature); mraa_firmata_context mraa_firmata_init(int feature);

View File

@@ -242,7 +242,7 @@ int mraa_gpio_get_pin_raw(mraa_gpio_context dev);
* @param mode Mode to set input pin state * @param mode Mode to set input pin state
* @return Result of operation * @return Result of operation
*/ */
mraa_result_t mraa_gpio_input_mode(mraa_gpio_context dev, mraa_gpio_input_mode_t); mraa_result_t mraa_gpio_input_mode(mraa_gpio_context dev, mraa_gpio_input_mode_t mode);
/** /**
* Set Gpio output driver mode. This is not a standard feature, it needs custom implementation for each board * Set Gpio output driver mode. This is not a standard feature, it needs custom implementation for each board

View File

@@ -127,7 +127,7 @@ class Gpio
* Gpio Constructor, takes a pointer to the GPIO context and initialises * Gpio Constructor, takes a pointer to the GPIO context and initialises
* the GPIO class * the GPIO class
* *
* @param void * to GPIO context * @param gpio_context void * to GPIO context
*/ */
Gpio(void* gpio_context) Gpio(void* gpio_context)
{ {

View File

@@ -65,7 +65,7 @@ class I2c
/** /**
* I2C constructor, takes a pointer to a I2C context and initialises the I2C class * I2C constructor, takes a pointer to a I2C context and initialises the I2C class
* *
* @param void * to an I2C context * @param i2c_context void * to an I2C context
*/ */
I2c(void* i2c_context) I2c(void* i2c_context)
{ {

View File

@@ -27,22 +27,37 @@
#include "common.h" #include "common.h"
#include "iio_kernel_headers.h" #include "iio_kernel_headers.h"
/** Mraa Iio Channels */
typedef struct { typedef struct {
/** Channel index */
int index; int index;
/** Channel enabled/disabled */
int enabled; int enabled;
/** Channel type */
char* type; char* type;
/** Channel endianes */
mraa_boolean_t lendian; mraa_boolean_t lendian;
/** Channel signed */
int signedd; int signedd;
/** Channel offset */
unsigned int offset; unsigned int offset;
/** Channel mask */
uint64_t mask; uint64_t mask;
/** Channel used bits */
unsigned int bits_used; unsigned int bits_used;
/** Channel bytes */
unsigned int bytes; unsigned int bytes;
/** Channel shift */
unsigned int shift; unsigned int shift;
/** Channel location */
unsigned int location; unsigned int location;
} mraa_iio_channel; } mraa_iio_channel;
/** Mraa Iio Event */
typedef struct { typedef struct {
/** Event name */
char* name; char* name;
/** Event enabled/disabled */
int enabled; int enabled;
} mraa_iio_event; } mraa_iio_event;
@@ -74,44 +89,171 @@ typedef struct _iio* mraa_iio_context;
/** /**
* Initialise iio context * Initialise iio context
* *
* @param bus iio device to use * @param device iio device to use
* @return i2c context or NULL * @return i2c context or NULL
*/ */
mraa_iio_context mraa_iio_init(int device); mraa_iio_context mraa_iio_init(int device);
/**
* Trigger buffer
*
* @param dev The iio context
* @param fptr Callback
* @param args Arguments
* @return Result of operation
*/
mraa_result_t mraa_iio_trigger_buffer(mraa_iio_context dev, void (*fptr)(char* data), void* args); mraa_result_t mraa_iio_trigger_buffer(mraa_iio_context dev, void (*fptr)(char* data), void* args);
/**
* Get device name
*
* @param dev The iio context
* @return Name of the device
*/
const char* mraa_iio_get_device_name(mraa_iio_context dev); const char* mraa_iio_get_device_name(mraa_iio_context dev);
/**
* Get device number
*
* @param name Name of the device
* @return Device Number
*/
int mraa_iio_get_device_num_by_name(const char* name); int mraa_iio_get_device_num_by_name(const char* name);
/**
* Read size
*
* @param dev The iio context
* @return Size
*/
int mraa_iio_read_size(mraa_iio_context dev); int mraa_iio_read_size(mraa_iio_context dev);
/**
* Get channels
*
* @param dev The iio context
* @return Channels
*/
mraa_iio_channel* mraa_iio_get_channels(mraa_iio_context dev); mraa_iio_channel* mraa_iio_get_channels(mraa_iio_context dev);
/**
* Get channels count
*
* @param dev The iio context
* @return Channels count
*/
int mraa_iio_get_channel_count(mraa_iio_context dev); int mraa_iio_get_channel_count(mraa_iio_context dev);
/**
* Read float from file
*
* @param dev The iio context
* @param filename Filename
* @param data Data
* @return Result of operation
*/
mraa_result_t mraa_iio_read_float(mraa_iio_context dev, const char* filename, float* data); mraa_result_t mraa_iio_read_float(mraa_iio_context dev, const char* filename, float* data);
/**
* Read int from file
*
* @param dev The iio context
* @param filename Filename
* @param data Data
* @return Result of operation
*/
mraa_result_t mraa_iio_read_int(mraa_iio_context dev, const char* filename, int* data); mraa_result_t mraa_iio_read_int(mraa_iio_context dev, const char* filename, int* data);
/**
* Read String from file
*
* @param dev The iio context
* @param filename Filename
* @param data Data
* @param max_len Max lenght to read
* @return Result of operation
*/
mraa_result_t mraa_iio_read_string(mraa_iio_context dev, const char* filename, char* data, int max_len); mraa_result_t mraa_iio_read_string(mraa_iio_context dev, const char* filename, char* data, int max_len);
/**
* Write float
*
* @param dev The iio context
* @param attr_chan Channel attributes
* @param data Float to write
* @return Result of operation
*/
mraa_result_t mraa_iio_write_float(mraa_iio_context dev, const char* attr_chan, const float data); mraa_result_t mraa_iio_write_float(mraa_iio_context dev, const char* attr_chan, const float data);
/**
* Write int
*
* @param dev The iio context
* @param attr_chan Channel attributes
* @param data Int to write
* @return Result of operation
*/
mraa_result_t mraa_iio_write_int(mraa_iio_context dev, const char* attr_chan, const int data); mraa_result_t mraa_iio_write_int(mraa_iio_context dev, const char* attr_chan, const int data);
/**
* Write string
*
* @param dev The iio context
* @param attr_chan Channel attributes
* @param data String to write
* @return Result of operation
*/
mraa_result_t mraa_iio_write_string(mraa_iio_context dev, const char* attr_chan, const char* data); mraa_result_t mraa_iio_write_string(mraa_iio_context dev, const char* attr_chan, const char* data);
/**
* Get channel data
*
* @param dev The iio context
* @return Result of operation
*/
mraa_result_t mraa_iio_get_channel_data(mraa_iio_context dev); mraa_result_t mraa_iio_get_channel_data(mraa_iio_context dev);
/**
* Get event data
*
* @param dev The iio context
* @return Result of operation
*/
mraa_result_t mraa_iio_get_event_data(mraa_iio_context dev); mraa_result_t mraa_iio_get_event_data(mraa_iio_context dev);
/**
* Event poll
*
* @param dev The iio context
* @param data Data
* @return Result of operation
*/
mraa_result_t mraa_iio_event_poll(mraa_iio_context dev, struct iio_event_data* data); mraa_result_t mraa_iio_event_poll(mraa_iio_context dev, struct iio_event_data* data);
/**
* Setup event callback
*
* @param dev The iio context
* @param fptr Callback
* @param args Arguments
* @return Result of operation
*/
mraa_result_t mraa_result_t
mraa_iio_event_setup_callback(mraa_iio_context dev, void (*fptr)(struct iio_event_data* data, void* args), void* args); mraa_iio_event_setup_callback(mraa_iio_context dev, void (*fptr)(struct iio_event_data* data, void* args), void* args);
/**
* Extract event
*
* @param event Event
* @param chan_type Channel type
* @param modifier Modifier
* @param type Type
* @param direction Direction
* @param channel Channel
* @param channel2 Channel2
* @param different Different
* @return Result of operation
*/
mraa_result_t mraa_iio_event_extract_event(struct iio_event_data* event, mraa_result_t mraa_iio_event_extract_event(struct iio_event_data* event,
int* chan_type, int* chan_type,
int* modifier, int* modifier,
@@ -121,11 +263,32 @@ mraa_result_t mraa_iio_event_extract_event(struct iio_event_data* event,
int* channel2, int* channel2,
int* different); int* different);
/**
* Get mount matrix
* @param dev The iio context
* @param sysfs_name Sysfs name
* @param mm Matrix
* @return Result of operation
*/
mraa_result_t mraa_iio_get_mount_matrix(mraa_iio_context dev, const char *sysfs_name, float mm[9]); mraa_result_t mraa_iio_get_mount_matrix(mraa_iio_context dev, const char *sysfs_name, float mm[9]);
/**
* Create trigger
*
* @param dev The iio context
* @param trigger Trigger name
* @return Result of operation
*/
mraa_result_t mraa_iio_create_trigger(mraa_iio_context dev, const char* trigger); mraa_result_t mraa_iio_create_trigger(mraa_iio_context dev, const char* trigger);
/**
* Update channels
*
* @param dev The iio context
* @return Result of operation
*/
mraa_result_t mraa_iio_update_channels(mraa_iio_context dev); mraa_result_t mraa_iio_update_channels(mraa_iio_context dev);
/** /**
* De-inits an mraa_iio_context device * De-inits an mraa_iio_context device
* *

View File

@@ -32,21 +32,32 @@
namespace mraa namespace mraa
{ {
/** Iio Event Data */
struct IioEventData struct IioEventData
{ {
/** Channel Type */
int channelType; int channelType;
/** Modifier */
int modifier; int modifier;
/** Type */
int type; int type;
/** Direction */
int direction; int direction;
/** Channel */
int channel; int channel;
/** Channel 2 */
int channel2; int channel2;
/** Difference */
int diff; int diff;
}; };
/** Iio Handler */
class IioHandler class IioHandler
{ {
public: public:
/** onIioEvent Handler */
virtual void onIioEvent(const IioEventData& eventData) = 0; virtual void onIioEvent(const IioEventData& eventData) = 0;
/** Destructor */
virtual ~IioHandler() {}; // add an empty destructor to get rid of warning virtual ~IioHandler() {}; // add an empty destructor to get rid of warning
}; };
@@ -56,7 +67,7 @@ public:
* *
* This file defines the C++ iio interface for libmraa * This file defines the C++ iio interface for libmraa
* *
* @snippet iio_dummy_test.cpp Interesting * @snippet Iio-dummy.cpp Interesting
*/ */
class Iio class Iio
{ {

View File

@@ -115,12 +115,11 @@ enum iio_event_direction {
/** /**
* struct iio_event_data - The actual event being pushed to userspace * struct iio_event_data - The actual event being pushed to userspace
* @id: event identifier
* @timestamp: best estimate of time of event occurrence (often from
* the interrupt handler)
*/ */
struct iio_event_data { struct iio_event_data {
/** event identifier */
unsigned long long int id; unsigned long long int id;
/** best estimate of time of event occurrence (often from the interrupt handler) */
long long int timestamp; long long int timestamp;
}; };

View File

@@ -45,6 +45,7 @@ extern "C" {
#include "common.h" #include "common.h"
/** Mraa Pwm Context */
typedef struct _pwm* mraa_pwm_context; typedef struct _pwm* mraa_pwm_context;
/** /**

View File

@@ -71,7 +71,7 @@ class Pwm
* Pwm constructor, takes a pointer to the PWM context and * Pwm constructor, takes a pointer to the PWM context and
* initialises the class * initialises the class
* *
* @param void * to a PWM context * @param pwm_context void * to a PWM context
*/ */
Pwm(void* pwm_context) Pwm(void* pwm_context)
{ {

View File

@@ -71,7 +71,7 @@ class Spi
} }
/** /**
* Initialise SPI object using 'raw' mode. Mraa will go and grab the spidev device lablled /dev/spidev<bus>.<cs> * Initialise SPI object using 'raw' mode. Mraa will go and grab the spidev device lablled /dev/spidev[bus].[cs]
* *
* @param bus to use * @param bus to use
* @param cs to use * @param cs to use
@@ -89,7 +89,7 @@ class Spi
* Spi Constructor, takes a pointer to a SPI context and initialises * Spi Constructor, takes a pointer to a SPI context and initialises
* the SPI class * the SPI class
* *
* @param void * to SPI context * @param spi_context void * to SPI context
*/ */
Spi(void* spi_context) Spi(void* spi_context)
{ {

View File

@@ -245,6 +245,9 @@ typedef enum {
MRAA_I2C_HIGH = 2 /**< up to 3.4Mhz */ MRAA_I2C_HIGH = 2 /**< up to 3.4Mhz */
} mraa_i2c_mode_t; } mraa_i2c_mode_t;
/**
* Enum representing different uart parity states
*/
typedef enum { typedef enum {
MRAA_UART_PARITY_NONE = 0, MRAA_UART_PARITY_NONE = 0,
MRAA_UART_PARITY_EVEN = 1, MRAA_UART_PARITY_EVEN = 1,

View File

@@ -231,7 +231,7 @@ typedef enum {
} Pinmodes; } Pinmodes;
/** /**
* Enum reprensenting different i2c speeds/modes * Enum representing different i2c speeds/modes
*/ */
typedef enum { typedef enum {
I2C_STD = 0, /**< up to 100Khz */ I2C_STD = 0, /**< up to 100Khz */
@@ -239,6 +239,9 @@ typedef enum {
I2C_HIGH = 2 /**< up to 3.4Mhz */ I2C_HIGH = 2 /**< up to 3.4Mhz */
} I2cMode; } I2cMode;
/**
* Enum representing different uart parity states
*/
typedef enum { typedef enum {
UART_PARITY_NONE = 0, UART_PARITY_NONE = 0,
UART_PARITY_EVEN = 1, UART_PARITY_EVEN = 1,

View File

@@ -45,6 +45,7 @@ extern "C" {
#include "common.h" #include "common.h"
/** Mraa Uart Context */
typedef struct _uart* mraa_uart_context; typedef struct _uart* mraa_uart_context;
/** /**

View File

@@ -64,7 +64,7 @@ class Uart
* Uart Constructor, takes a string to the path of the serial * Uart Constructor, takes a string to the path of the serial
* interface that is needed. * interface that is needed.
* *
* @param uart the index of the uart set to use * @param path the index of the uart set to use
*/ */
Uart(std::string path) Uart(std::string path)
{ {
@@ -79,7 +79,7 @@ class Uart
* Uart Constructor, takes a pointer to the UART context and initialises * Uart Constructor, takes a pointer to the UART context and initialises
* the UART class * the UART class
* *
* @param void * to a UART context * @param uart_context void * to a UART context
*/ */
Uart(void* uart_context) Uart(void* uart_context)
{ {
@@ -160,7 +160,7 @@ class Uart
/** /**
* Write bytes in String object to a device * Write bytes in String object to a device
* *
* @param string to write * @param data string to write
* @return the number of bytes written, or -1 if an error occurred * @return the number of bytes written, or -1 if an error occurred
*/ */
int int
@@ -273,7 +273,6 @@ class Uart
/** /**
* Set the blocking state for write operations * Set the blocking state for write operations
* *
* @param dev The UART context
* @param nonblock new nonblocking state * @param nonblock new nonblocking state
* @return Result of operation * @return Result of operation
*/ */

View File

@@ -64,16 +64,20 @@ extern "C" {
#include "common.h" #include "common.h"
#include "uart.h" #include "uart.h"
/* 8 bytes (64 bits) for a device rom code */ /** 8 bytes (64 bits) for a device rom code */
#define MRAA_UART_OW_ROMCODE_SIZE 8 #define MRAA_UART_OW_ROMCODE_SIZE 8
/* for now, we simply use the normal MRAA UART context */ /** for now, we simply use the normal MRAA UART context */
typedef struct _mraa_uart_ow { typedef struct _mraa_uart_ow {
/** Uart Context */
mraa_uart_context uart; mraa_uart_context uart;
/* search state */ /** search state */
unsigned char ROM_NO[MRAA_UART_OW_ROMCODE_SIZE]; /* 8 byte (64b) rom code */ unsigned char ROM_NO[MRAA_UART_OW_ROMCODE_SIZE]; /* 8 byte (64b) rom code */
/** Context laxt discrepancy */
int LastDiscrepancy; int LastDiscrepancy;
/** Context las family discrepancy */
int LastFamilyDiscrepancy; int LastFamilyDiscrepancy;
/** Context las device flag */
mraa_boolean_t LastDeviceFlag; mraa_boolean_t LastDeviceFlag;
} *mraa_uart_ow_context; } *mraa_uart_ow_context;

View File

@@ -46,8 +46,8 @@ class UartOW
* UartOW Constructor, takes a pin number which will map directly to the * UartOW Constructor, takes a pin number which will map directly to the
* linux uart number, this 'enables' the uart, nothing more * linux uart number, this 'enables' the uart, nothing more
* *
* @throws std::invalid_argument in case of error
* @param uart the index of the uart to use * @param uart the index of the uart to use
* @throws std::invalid_argument in case of error
*/ */
UartOW(int uart) UartOW(int uart)
{ {
@@ -62,8 +62,8 @@ class UartOW
* UartOW Constructor, takes a string to the path of the serial * UartOW Constructor, takes a string to the path of the serial
* interface that is needed. * interface that is needed.
* *
* @throws std::invalid_argument in case of error
* @param path the file path for the UART to use * @param path the file path for the UART to use
* @throws std::invalid_argument in case of error
*/ */
UartOW(std::string path) UartOW(std::string path)
{ {

View File

@@ -3,14 +3,7 @@ version: '2.1'
services: services:
base: base:
image: mraa-base image: dnoliver/mraa-base
build:
context: .
dockerfile: docker/Dockerfile.base
args:
- http_proxy
- https_proxy
- no_proxy
environment: environment:
- http_proxy - http_proxy
- https_proxy - https_proxy
@@ -41,17 +34,18 @@ services:
doc: doc:
extends: base extends: base
image: dnoliver/mraa-all
environment: environment:
- BUILDSWIG=ON
- BUILDSWIGPYTHON=ON
- BUILDSWIGNODE=ON
- BUILDSWIGJAVA=ON
- BUILDDOC=ON - BUILDDOC=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild doc" command: bash -c "./scripts/run-cmake.sh && ./scripts/build-doc.sh"
sonar-scan: sonar-scan:
extends: base extends: base
image: mraa-sonar image: dnoliver/mraa-all
build:
dockerfile: docker/Dockerfile.sonar
args:
- NODE_VERSION=v5.12.0
environment: environment:
- BUILDSWIG=ON - BUILDSWIG=ON
- BUILDSWIGPYTHON=ON - BUILDSWIGPYTHON=ON
@@ -69,11 +63,52 @@ services:
- GITHUB_TOKEN - GITHUB_TOKEN
command: bash -c "./scripts/run-cmake.sh && cd build && ../scripts/sonar-scan.sh" command: bash -c "./scripts/run-cmake.sh && cd build && ../scripts/sonar-scan.sh"
usbplat:
extends: base
image: dnoliver/mraa-all
environment:
- USBPLAT=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild"
firmata:
extends: base
image: dnoliver/mraa-all
environment:
- FIRMATA=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild"
imraa:
extends: base
image: dnoliver/mraa-all
environment:
- IMRAA=ON
- FIRMATA=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild"
ftdi4442:
extends: base
image: dnoliver/mraa-all
environment:
- FTDI4222=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild"
ipk:
extends: base
image: dnoliver/mraa-all
environment:
- IPK=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild package"
rpm:
extends: base
image: dnoliver/mraa-all
environment:
- RPM=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild package"
python2: python2:
extends: base extends: base
image: mraa-python image: dnoliver/mraa-python
build:
dockerfile: docker/Dockerfile.python
environment: environment:
- BUILDSWIG=ON - BUILDSWIG=ON
- BUILDSWIGPYTHON=ON - BUILDSWIGPYTHON=ON
@@ -87,9 +122,7 @@ services:
java: java:
extends: base extends: base
image: mraa-java image: dnoliver/mraa-java
build:
dockerfile: docker/Dockerfile.java
environment: environment:
- BUILDSWIG=ON - BUILDSWIG=ON
- BUILDSWIGJAVA=ON - BUILDSWIGJAVA=ON
@@ -97,20 +130,14 @@ services:
android: android:
extends: java extends: java
image: mraa-android image: dnoliver/mraa-android
build:
dockerfile: docker/Dockerfile.android
environment: environment:
- BUILDARCH=PERIPHERALMAN - BUILDARCH=PERIPHERALMAN
command: bash -c "./scripts/build-android.sh" command: bash -c "./scripts/build-android.sh"
node4: node4:
extends: base extends: base
image: mraa-node4 image: dnoliver/mraa-node4
build:
dockerfile: docker/Dockerfile.node
args:
- NODE_VERSION=v4.4.7
environment: environment:
- BUILDSWIG=ON - BUILDSWIG=ON
- BUILDSWIGNODE=ON - BUILDSWIGNODE=ON
@@ -118,7 +145,8 @@ services:
node5: node5:
extends: node4 extends: node4
image: mraa-node5 image: dnoliver/mraa-node5
build:
args: node6:
- NODE_VERSION=v5.12.0 extends: node4
image: dnoliver/mraa-node6

View File

@@ -1,29 +0,0 @@
FROM mraa-java
WORKDIR /opt
# Install CMake 3.6.2
RUN wget -q https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.sh && \
mkdir /opt/cmake && \
sh /opt/cmake-3.6.2-Linux-x86_64.sh --prefix=/opt/cmake --skip-license && \
ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake && \
cmake --version && \
rm -fr /opt/cmake-3.6.2-Linux-x86_64.sh
# Android NDK build Dependencies
RUN wget -q https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip && \
unzip -qq android-ndk-r14b-linux-x86_64.zip && \
rm -fr android-ndk-r14b-linux-x86_64.zip
ENV NDK_HOME /opt/android-ndk-r14b
ENV NDK_MODULE_PATH /opt/android-ndk-r14b
# Android Things library
RUN wget -q https://github.com/androidthings/native-libandroidthings/archive/0.4.1-devpreview.tar.gz && \
tar xf 0.4.1-devpreview.tar.gz && \
rm -fr /opt/0.4.1-devpreview.tar.gz
ENV ANDROIDTHINGS_NATIVE_LIB /opt/native-libandroidthings-0.4.1-devpreview
# Set Workdir
WORKDIR $MRAA_SRC_DIR
CMD bash

View File

@@ -1,43 +0,0 @@
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
# Update apt-get
RUN apt-get -y update && \
# Install apt-utils
apt-get -y --no-install-recommends install apt-utils && \
# Main Build Dependencies
apt-get -y --no-install-recommends install git build-essential cmake clang-3.8 \
g++-4.8 wget ca-certificates libpcre3 libpcre3-dev python unzip \
# Docs Build Dependencies
python-sphinx doxygen graphviz \
# Json Platform Build Dependencies
pkg-config libjson0 libjson0-dev \
# Imraa Platform Build Dependencies
libudev-dev \
# Doc Build Dependencies
python-sphinx doxygen graphviz
# Set library download folder to /opt
WORKDIR /opt
# Swig Build Dependencies
ARG SWIG_VERSION=3.0.10
RUN wget -q http://iotdk.intel.com/misc/tr/swig-$SWIG_VERSION.tar.gz && \
tar xf swig-$SWIG_VERSION.tar.gz && cd swig-$SWIG_VERSION && \
./configure --prefix=/usr/ && make -j8 && make -j8 install && cd .. && \
rm -fr /opt/swig-$SWIG_VERSION.tar.gz
# FTDI4222 Build Dependencies
ARG FTDI4222_VERSION=linux-1.3.1.117
RUN mkdir libft4222-$FTDI4222_VERSION && cd libft4222-$FTDI4222_VERSION && \
wget -q http://www.ftdichip.com/Support/SoftwareExamples/libft4222-$FTDI4222_VERSION.tgz && \
tar xf libft4222-$FTDI4222_VERSION.tgz && ./install4222.sh && \
rm -fr libft4222-$FTDI4222_VERSION.tgz
# Set Workdir
ARG MRAA_SRC_DIR=/usr/src/app
ENV MRAA_SRC_DIR $MRAA_SRC_DIR
WORKDIR $MRAA_SRC_DIR
CMD bash

View File

@@ -1,14 +0,0 @@
FROM mraa-base
# Update apt-get
RUN apt-get -y update && \
# Java Build Dependencies
apt-get -y --no-install-recommends install default-jre default-jdk
# Set JAVA_HOME
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
# Set Workdir
WORKDIR $MRAA_SRC_DIR
CMD bash

View File

@@ -1,16 +0,0 @@
FROM mraa-base
WORKDIR /opt
# Node.js Build Dependencies
RUN wget -q -O - https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
ENV NVM_DIR /root/.nvm
ARG NODE_VERSION
RUN . $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use $NODE_VERSION && \
npm install -g node-gyp && node-gyp install
ENV PATH $NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH
# Set Workdir
WORKDIR $MRAA_SRC_DIR
CMD bash

View File

@@ -1,13 +0,0 @@
FROM mraa-base
# Update apt-get
RUN apt-get -y update && \
# Python 2 Build Dependencies
apt-get -y --no-install-recommends install python python-dev \
# Python 3 Build Dependencies
python3 python3-dev
# Set Workdir
WORKDIR $MRAA_SRC_DIR
CMD bash

View File

@@ -1,39 +0,0 @@
FROM mraa-base
# Update apt-get
RUN apt-get -y update && \
# Python 2 Build Dependencies
apt-get -y --no-install-recommends install python python-dev \
# Python 3 Build Dependencies
python3 python3-dev \
# Java Build Dependencies
default-jre default-jdk
# Set JAVA_HOME
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
WORKDIR /opt
# Node.js Build Dependencies
RUN wget -q -O - https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
ENV NVM_DIR /root/.nvm
ARG NODE_VERSION
RUN . $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use $NODE_VERSION && \
npm install -g node-gyp && node-gyp install
ENV PATH $NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH
# Static Code Analysis Scanner
ENV SONAR_DIR /opt/sonar
ENV SONAR_VER "3.0.3.778"
WORKDIR $SONAR_DIR
RUN wget https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_VER}-linux.zip && \
wget https://sonarqube.com/static/cpp/build-wrapper-linux-x86.zip && \
unzip sonar-scanner-cli-${SONAR_VER}-linux.zip && \
unzip build-wrapper-linux-x86.zip && \
rm sonar-scanner-cli-${SONAR_VER}-linux.zip build-wrapper-linux-x86.zip
ENV PATH $SONAR_DIR/sonar-scanner-${SONAR_VER}-linux/bin:$SONAR_DIR/build-wrapper-linux-x86:$PATH
# Set Workdir
WORKDIR $MRAA_SRC_DIR
CMD bash

View File

@@ -1,4 +1,4 @@
96Boards Development Platform {#96boards} 96Boards Development Platform {#_96boards}
============================= =============================
96Boards is a range of hardware specifications created by Linaro to make the latest ARM-based processors available to developers at a reasonable cost. The specifications are open and define a standard board layout for SoC-agnostic (processor independent) development platforms that can be used by software application, hardware device, kernel and other system software developers. Boards produced to the 96Boards specifications are suitable for rapid prototyping, hobbyist projects or incorporation into new systems for a wide range of applications including desktop and laptop computing, the digital home, digital signage, point of sale (POS), high-end audio, robotics and drones, artificial intelligence, virtual reality, IoT and industrial control. 96Boards is a range of hardware specifications created by Linaro to make the latest ARM-based processors available to developers at a reasonable cost. The specifications are open and define a standard board layout for SoC-agnostic (processor independent) development platforms that can be used by software application, hardware device, kernel and other system software developers. Boards produced to the 96Boards specifications are suitable for rapid prototyping, hobbyist projects or incorporation into new systems for a wide range of applications including desktop and laptop computing, the digital home, digital signage, point of sale (POS), high-end audio, robotics and drones, artificial intelligence, virtual reality, IoT and industrial control.

View File

@@ -4,7 +4,7 @@ libmraa uses cmake in order to make compilation relatively painless. CMake runs
build out of tree so the recommended way is to clone from git and make a `build/` build out of tree so the recommended way is to clone from git and make a `build/`
directory inside the clone directory. directory inside the clone directory.
For building imraa check [building imraa](./imraa.md) For building imraa check @ref buildingimraa page.
## Build dependencies ## Build dependencies
Not all these are required but if you're unsure of what you're doing this is Not all these are required but if you're unsure of what you're doing this is
what you'll need: what you'll need:
@@ -95,8 +95,10 @@ Building doc, this will require [SPHINX](http://sphinx-doc.org) &
`-DBUILDDOC=ON` `-DBUILDDOC=ON`
You will also require clone git submodules from your existing checkout: You will also require clone git submodules from your existing checkout:
`git submodule update --init --recursive` `git submodule update --init --recursive`
The from doxygen2jsdoc dir: Then from doxygen2jsdoc dir:
`npm install mkdirp commander lodash bluebird pegjs` `npm install`
Then from doxyport dir:
`make setup`
Override build architecture (this is useful because on x86 ARM code is not Override build architecture (this is useful because on x86 ARM code is not
compiled so use this flag to force the target arch) compiled so use this flag to force the target arch)
@@ -166,7 +168,7 @@ To run, make sure `libmraajava.so` is in `LD_LIBRARY_PATH`
jave -cp $DIR_WHERE_YOU_INSTALLED_MRAA/mraa.jar:. Example jave -cp $DIR_WHERE_YOU_INSTALLED_MRAA/mraa.jar:. Example
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
If you want to add or improve Java bindings for mraa, please follow the [Creating Java Bindings Guide](https://github.com/intel-iot-devkit/upm/blob/master/docs/creating_java_bindings.md). If you want to add or improve Java bindings for mraa, please follow the <a href="https://github.com/intel-iot-devkit/upm/blob/master/docs/creating_java_bindings.md">Creating Java Bindings Guide</a>.
## Building an IPK/RPM package using `cpack` ## Building an IPK/RPM package using `cpack`
@@ -195,7 +197,8 @@ The [Things Native Library](https://github.com/androidthings/native-libandroidth
[FindAndroidThings.cmake](https://github.com/androidthings/native-libandroidthings/blob/master/FindAndroidThings.cmake). Make sure the directory containing this module is [FindAndroidThings.cmake](https://github.com/androidthings/native-libandroidthings/blob/master/FindAndroidThings.cmake). Make sure the directory containing this module is
added to the CMAKE_MODULE_PATH. added to the CMAKE_MODULE_PATH.
#### NDK r14b ### NDK r14b
~~~~~~~~~~~~~{.sh} ~~~~~~~~~~~~~{.sh}
cmake -DBUILDSWIG=OFF -DBUILDARCH=PERIPHERALMAN -DANDROID_TOOLCHAIN_NAME=x86-i686 -DCMAKE_TOOLCHAIN_FILE=/path/to/android-ndk-r14b/build/cmake/android.toolchain.cmake -DCMAKE_MODULE_PATH=/path/to/native-libandroidthings .. cmake -DBUILDSWIG=OFF -DBUILDARCH=PERIPHERALMAN -DANDROID_TOOLCHAIN_NAME=x86-i686 -DCMAKE_TOOLCHAIN_FILE=/path/to/android-ndk-r14b/build/cmake/android.toolchain.cmake -DCMAKE_MODULE_PATH=/path/to/native-libandroidthings ..
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
@@ -212,61 +215,6 @@ Requirements:
**NOTE:** docker-compose is an optional requirement. It actually make running complex **NOTE:** docker-compose is an optional requirement. It actually make running complex
docker build and run command easier. But you can just use docker to build and run. docker build and run command easier. But you can just use docker to build and run.
### Docker Images Hierarchy
To improve build times and images sizes, mraa use a build hierarchy to incrementally
create a build environment. Find below a brief description of them:
1. **mraa-base:** Provides the basic infrastructure and tools to compile C/C++ code and documentation.
2. **mraa-python:** Provides the python2/python3 build tools. Depends on `mraa-base`.
3. **mraa-java:** Provides the Java build tools. Depends on `mraa-base`.
4. **mraa-android:** Provides the Android Things build tools. Depends on `mraa-java`.
5. **mraa-node4:** Provides the Node.js v4.4.7 build tools. Depends on `mraa-base`.
6. **mraa-node5:** Same as `mraa-node4`, but using Node.js v5.12.0.
7. **mraa-sonar:** Provides the tools for running [Sonar Qube](https://www.sonarqube.org/) Scans. Depends on `mraa-base`.
**NOTE:** If you want to know which tools are installed for each of the mraa targets,
just take a look at the `docker/` folder. All the related Dockerfiles are stored there!
### Building Docker Images
**tl;dr:** Just use this commands to build the hierarchy:
```sh
# Build the base image
$ docker-compose build base
# Build python image
$ docker-compose build python
# Build java image
$ docker-compose build java
# Build node4 image
$ docker-compose build node4
# Build node5 image
$ docker-compose build node5
# Build android things image
$ docker-compose build android
# Build sonar image
$ docker-compose build sonar-scan
```
**docker-compose** will take a look at the `docker-compose.yaml` file in the repository
root directory, and build the requested target for you. At the end, docker-compose will
tag the image built with an `mraa-` prefix. You can check them by running `docker images`.
If you don't want to use docker-compose, you can also use `docker build` to generate every image.
For example, to create the base image, you can do:
```sh
# From the repository root folder
$ docker build -d docker/Dockerfile.base -t mraa-base .
```
Now, you don't actually need to build every image to start working. Let's say you
are a Python developer, and has no idea what Node.js is, just build the base and
python image!
**NOTE:** If you work on Android Things, you will need the base, java, and android image.
### Using Docker Images to build Mraa ### Using Docker Images to build Mraa
**tl;dr:** Just use this commands to build mraa: **tl;dr:** Just use this commands to build mraa:
@@ -284,6 +232,8 @@ $ docker-compose run java
$ docker-compose run node4 $ docker-compose run node4
# Build mraa node5 package # Build mraa node5 package
$ docker-compose run node5 $ docker-compose run node5
# Build mraa node6 package
$ docker-compose run node6
# Build mraa for android things package # Build mraa for android things package
$ docker-compose run android $ docker-compose run android
# Run Sonar Qube Scans for mraa # Run Sonar Qube Scans for mraa
@@ -291,7 +241,8 @@ $ docker-compose run sonar-scan
``` ```
**docker-compose** will take a look at the `docker-compose.yaml` file in the repository **docker-compose** will take a look at the `docker-compose.yaml` file in the repository
root directory, and run an specific command to build mraa for the requested target. root directory, pull the required docker image, and run an specific command to build
mraa for the requested target.
Once the build is completed, you will have a `build/` folder in the repository root with all Once the build is completed, you will have a `build/` folder in the repository root with all
the compiled code. This `build/` folder is created by using a docker volume. The `build\` the compiled code. This `build/` folder is created by using a docker volume. The `build\`
folder contents is reused each time you execute `docker-compose run [TARGET]`. folder contents is reused each time you execute `docker-compose run [TARGET]`.
@@ -318,7 +269,7 @@ $ docker run \
--env BUILDSWIGPYTHON=ON \ --env BUILDSWIGPYTHON=ON \
--env BUILDSWIGJAVA=OFF \ --env BUILDSWIGJAVA=OFF \
--env BUILDSWIGNODE=OFF \ --env BUILDSWIGNODE=OFF \
mraa-python \ dnoliver/mraa-python \
bash -c "./scripts/run-cmake.sh && make -Cbuild _python2-mraa" bash -c "./scripts/run-cmake.sh && make -Cbuild _python2-mraa"
``` ```
@@ -332,25 +283,6 @@ to proxy settings:
Visit [this link](https://docs.docker.com/engine/admin/systemd/#httphttps-proxy) Visit [this link](https://docs.docker.com/engine/admin/systemd/#httphttps-proxy)
to configure docker daemon behind a proxy. to configure docker daemon behind a proxy.
**docker build fails to fetch packages from internet**
docker-compose will automatically take `http_proxy`, `https_proxy`, and `no_proxy`
environment variables and use it as build arguments. Be sure to properly configure
this variables before building.
docker, unlinke docker-compose, do not take the proxy settings from the environment
automatically. You need to send them as build arguments:
```sh
# From the repository root folder
$ docker build \
-d docker/Dockerfile.base \
--build-arg http_proxy=$http_proxy \
--build-arg https_proxy=$https_proxy \
--build-arg no_proxy=$no_proxy \
-t mraa-base .
```
**docker run fails to access the internet** **docker run fails to access the internet**
docker-compose will automatically take `http_proxy`, `https_proxy`, and `no_proxy` docker-compose will automatically take `http_proxy`, `https_proxy`, and `no_proxy`
@@ -371,6 +303,6 @@ $ docker run \
--env http_proxy=$http_proxy \ --env http_proxy=$http_proxy \
--env https_proxy=$https_proxy \ --env https_proxy=$https_proxy \
--env no_proxy=$no_proxy \ --env no_proxy=$no_proxy \
mraa-python \ dnoliver/mraa-python \
bash -c "./scripts/run-cmake.sh && make -Cbuild _python2-mraa" bash -c "./scripts/run-cmake.sh && make -Cbuild _python2-mraa"
``` ```

View File

@@ -1,5 +1,6 @@
{#grossetete} Grosstete {#grossetete}
=========
You probably meant to go here: @joule. You probably meant to go here: @ref joule.
Note: This page will be deleted in the future, don't link to it! Note: This page will be deleted in the future, don't link to it!

View File

@@ -6,7 +6,7 @@ MRAA_GENERIC_FIRMATA subplatform to the first process that calls imraa_init
## Build dependencies ## Build dependencies
To build imraa, you'll need to build mraa with -DIMRAA=ON and all the normal To build imraa, you'll need to build mraa with -DIMRAA=ON and all the normal
dependencies for build mraa, see [Building mraa](./building.md). dependencies for build mraa, see @ref building page.
You'll also need the following: You'll also need the following:
* [dfu-utils-cross](https://github.com/arduino/dfu-utils-cross) or dfu 0.8 (0.9 * [dfu-utils-cross](https://github.com/arduino/dfu-utils-cross) or dfu 0.8 (0.9
does not work well with the 101). Precompiled binaries can be found on does not work well with the 101). Precompiled binaries can be found on

View File

@@ -56,7 +56,7 @@ Specific platform information for supported platforms is documented here:
Sometimes it just doesn't want to work, let us try and help you, you can file Sometimes it just doesn't want to work, let us try and help you, you can file
issues in github or join us in #mraa on freenode IRC, hang around for a little issues in github or join us in #mraa on freenode IRC, hang around for a little
while because we're not necessarily on 24/7, but we'll get back to you! Have a while because we're not necessarily on 24/7, but we'll get back to you! Have a
glance at our @debugging page too glance at our @ref debugging page too
## COMPILING ## COMPILING

View File

@@ -56,7 +56,7 @@ Specific platform information for supported platforms is documented here:
Sometimes it just doesn't want to work, let us try and help you, you can file Sometimes it just doesn't want to work, let us try and help you, you can file
issues in github or join us in #mraa on freenode IRC, hang around for a little issues in github or join us in #mraa on freenode IRC, hang around for a little
while because we're not necessarily on 24/7, but we'll get back to you! Have a while because we're not necessarily on 24/7, but we'll get back to you! Have a
glance at our @debugging page too glance at our @ref debugging page too
## COMPILING ## COMPILING

View File

@@ -26,7 +26,8 @@ See [SPI mock header](../include/mock/mock_board_spi.h#L38-L39) for constant val
* Single UART port. All functions are supported, but many are simple stubs. Write * Single UART port. All functions are supported, but many are simple stubs. Write
always succeeds, read returns 'Z' symbol as many times as `read()` requested. always succeeds, read returns 'Z' symbol as many times as `read()` requested.
We plan to develop it further and all [contributions](../CONTRIBUTING.md) are more than welcome. We plan to develop it further and all contributions are more than welcome. See our
@ref contributing page for more information.
See the table below for pin layout and features See the table below for pin layout and features
@@ -47,7 +48,7 @@ Building
-------- --------
Generally all the building steps are the same as listed Generally all the building steps are the same as listed
in the [main building guide](./building.md), you just need to set some specific in the main @ref building guide, you just need to set some specific
CMake options. CMake options.
### Linux ### Linux

1
doxyport Submodule

Submodule doxyport added at db3e1a6eb8

View File

@@ -107,6 +107,7 @@ protected:
} }
}; };
//! [Interesting]
int int
main() main()
{ {
@@ -154,4 +155,4 @@ main()
delete iio_device; delete iio_device;
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
//! [Interesting]

29
scripts/build-doc.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -x
set -e
# Install doxygen2jsdoc dependencies
cd doxygen2jsdoc && npm install && cd ..
# Install doxyport dependencies
cd doxyport && make setup && cd ..
# Make Documentation
make -j8 -Cbuild
# Make Java Documentation
cd build/src/java && echo ../../../src/mraa.i > mraa.i.list && \
../../../doxyport/doxyport mraa.i.list \
--cmake ../../compile_commands.json \
--source ../../../api,../../../api/mraa \
--destination $(pwd)/ \
--convert-protected-to-private \
--output mraa-java-files.txt \
--mapping ../../../examples/samples.mapping.txt && \
doxygen Doxyfile && cd ../../../
# Copy output to build/html/ directory
cp -r build/src/python/python2/docs/html build/html/python && \
cp -r build/src/java/html build/html/java && \
cp build/jsdoc/ternjs/mraa/doc.js build/html/node/mraa_tern.js

View File

@@ -21,6 +21,7 @@ cmake \
-DINSTALLTOOLS=$INSTALLTOOLS \ -DINSTALLTOOLS=$INSTALLTOOLS \
-DBUILDTESTS=$BUILDTESTS \ -DBUILDTESTS=$BUILDTESTS \
-DUSEPYTHON3TESTS=$USEPYTHON3TESTS \ -DUSEPYTHON3TESTS=$USEPYTHON3TESTS \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-H. \ -H. \
-Bbuild -Bbuild

View File

@@ -37,6 +37,7 @@ sonar_cmd_base="build-wrapper-linux-x86-64 --out-dir ${bw_output_path} make clea
-Dsonar.projectBaseDir=${MRAA_SRC_DIR} \ -Dsonar.projectBaseDir=${MRAA_SRC_DIR} \
-Dsonar.sources=${MRAA_SRC_DIR} \ -Dsonar.sources=${MRAA_SRC_DIR} \
-Dsonar.inclusions='api/**/*,CMakeLists.txt,examples/**/*,imraa/**/*,include/**/*,src/**/*,tests/**/*' \ -Dsonar.inclusions='api/**/*,CMakeLists.txt,examples/**/*,imraa/**/*,include/**/*,src/**/*,tests/**/*' \
-Dsonar.java.binaries='src' \
-Dsonar.coverage.exclusions='**/*' \ -Dsonar.coverage.exclusions='**/*' \
-Dsonar.cfamily.build-wrapper-output=${bw_output_path} \ -Dsonar.cfamily.build-wrapper-output=${bw_output_path} \
-Dsonar.host.url=https://sonarqube.com \ -Dsonar.host.url=https://sonarqube.com \

View File

@@ -108,7 +108,7 @@ if (BUILDDOC)
find_package(Yuidoc) find_package(Yuidoc)
if (YUIDOC_FOUND) if (YUIDOC_FOUND)
add_custom_target(jsdoc ALL add_custom_target(jsdoc ALL
COMMAND ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/docgen.js -m mraa i xml/ -o jsdoc -c ${CMAKE_CURRENT_SOURCE_DIR}/doxygen2jsdoc_custom.json --strict -h COMMAND ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/docgen.js -m mraa -i xml/ -o jsdoc -c ${CMAKE_CURRENT_SOURCE_DIR}/doxygen2jsdoc_custom.json --strict
COMMAND ${YUIDOC_EXECUTABLE} -C --no-sort --helpers ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/generators/yuidoc/tmpl/mraa/helper.js --themedir ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/generators/yuidoc/tmpl/mraa -o html/node jsdoc/yuidoc/mraa COMMAND ${YUIDOC_EXECUTABLE} -C --no-sort --helpers ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/generators/yuidoc/tmpl/mraa/helper.js --themedir ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/generators/yuidoc/tmpl/mraa -o html/node jsdoc/yuidoc/mraa
COMMAND ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/tolower.js -i html/node COMMAND ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/tolower.js -i html/node
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}

View File

@@ -4,19 +4,6 @@
%include std_string.i %include std_string.i
%include exception.i %include exception.i
#ifdef DOXYGEN
//and doesn't seem to work correctly in SWIG's preprocessor
#ifdef SWIGPYTHON2
%include common_hpp_doc.i
%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
%include uart_class_doc.i
#endif
#endif
%{ %{
#include "common.hpp" #include "common.hpp"
#include "types.hpp" #include "types.hpp"

View File

@@ -19,7 +19,7 @@ if (DOXYGEN_FOUND)
set (SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html") set (SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")
# doc .rst locations # doc .rst locations
set (SPHINX_DOC_LOATION "${CMAKE_CURRENT_SOURCE_DIR}") set (SPHINX_DOC_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}")
configure_file( configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" "${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
@@ -31,7 +31,7 @@ if (DOXYGEN_FOUND)
${SPHINX_EXECUTABLE} -b html ${SPHINX_EXECUTABLE} -b html
-c "${BINARY_BUILD_DIR}" -c "${BINARY_BUILD_DIR}"
-d "${SPHINX_CACHE_DIR}" -d "${SPHINX_CACHE_DIR}"
"${SPHINX_DOC_LOATION}" "${SPHINX_DOC_LOCATION}"
"${SPHINX_HTML_DIR}" "${SPHINX_HTML_DIR}"
COMMENT "Building HTML documentation with Sphinx" COMMENT "Building HTML documentation with Sphinx"
) )

View File

@@ -31,7 +31,7 @@ sys.path.insert(0, "@CMAKE_BINARY_DIR@/src/python/python2")
# ones. # ones.
extensions = [ extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.autodoc',
'sphinx.ext.viewcode', 'sphinx.ext.viewcode'
] ]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
@@ -131,7 +131,7 @@ html_theme_path = ['@SPHINX_THEME_DIR@']
# Add any paths that contain custom static files (such as style sheets) here, # Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files, # relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] #html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or # Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied # .htaccess) here, relative to this directory. These files are copied

View File

@@ -12,12 +12,12 @@ Hello GPIO
Here is the simplest Gpio program in mraa. Here is the simplest Gpio program in mraa.
.. literalinclude:: ../../../examples/python/hello_gpio.py .. literalinclude:: ../../../../examples/python/hello_gpio.py
:prepend: import mraa :prepend: import mraa
:start-after: import mraa :start-after: import mraa
GPIO Interrupt (isr) GPIO Interrupt (isr)
=================== ====================
The GPIO module allows you to set an interrupt on a GPIO. This interrupt is The GPIO module allows you to set an interrupt on a GPIO. This interrupt is
controlled by the mode that the 'edge' is in. Before setting another isr please controlled by the mode that the 'edge' is in. Before setting another isr please
@@ -27,7 +27,7 @@ values.
**Note:** Galileo Gen1 only supports EDGE_BOTH **Note:** Galileo Gen1 only supports EDGE_BOTH
.. literalinclude:: ../../../examples/python/hello_isr.py .. literalinclude:: ../../../../examples/python/hello_isr.py
:prepend: import mraa :prepend: import mraa
:start-after: import mraa :start-after: import mraa
@@ -44,11 +44,11 @@ The I2c module module has a number of different ways of interacting with the
i2c bus, including a number of overloaded read() calls and the writeReg() i2c bus, including a number of overloaded read() calls and the writeReg()
helper function. helper function.
.. literalinclude:: ../../../examples/python/bmp85.py .. literalinclude:: ../../../../examples/python/bmp85.py
:prepend: x = m.I2c(0) :prepend: x = m.I2c(0)
:start-after: x = m.I2c(0) :start-after: x = m.I2c(0)
.. literalinclude:: ../../../docs/i2c.txt .. literalinclude:: ../../../../docs/i2c.txt
Pwm Pwm
=== ===
@@ -56,7 +56,7 @@ Pwm
The PWM module is rather simple, note that different hardware support PWM The PWM module is rather simple, note that different hardware support PWM
generation is various different ways so results may vary. generation is various different ways so results may vary.
.. literalinclude:: ../../../examples/python/cycle-pwm3.py .. literalinclude:: ../../../../examples/python/cycle-pwm3.py
:prepend: import mraa :prepend: import mraa
:start-after: import mraa :start-after: import mraa
@@ -67,7 +67,7 @@ The ADC is typically provided on a dedicated or shared SPI bus, this is
abstracted by the Linux kernel as spidev and abstracted again by mraa. It is abstracted by the Linux kernel as spidev and abstracted again by mraa. It is
fairly simple in use. fairly simple in use.
.. literalinclude:: ../../../examples/python/aio.py .. literalinclude:: ../../../../examples/python/aio.py
:prepend: import mraa :prepend: import mraa
:start-after: import mraa :start-after: import mraa
@@ -82,12 +82,12 @@ Here's a simple pair of programs comprising a sender and receiver pair.
Sender: Sender:
.. literalinclude:: ../../../examples/python/uart_sender.py .. literalinclude:: ../../../../examples/python/uart_sender.py
:prepend: import mraa :prepend: import mraa
:start-after: import mraa :start-after: import mraa
Receiver: Receiver:
.. literalinclude:: ../../../examples/python/uart_receiver.py .. literalinclude:: ../../../../examples/python/uart_receiver.py
:prepend: import mraa :prepend: import mraa
:start-after: import mraa :start-after: import mraa

View File

@@ -6,7 +6,7 @@
Welcome to mraa's documentation! Welcome to mraa's documentation!
================================ ================================
.. include:: ../../../docs/index.md .. include:: ../../../../docs/index.md
:start-after: ============== :start-after: ==============
:end-before: ## API :end-before: ## API
@@ -41,13 +41,15 @@ a C library. Generally attaching gdb to python works well, build mraa with
debug symbols and set breakpoints either in the SWIG _wrap functions, the C++ debug symbols and set breakpoints either in the SWIG _wrap functions, the C++
method/functions or the underlying C function. More info can be found on the method/functions or the underlying C function. More info can be found on the
C/C++ documentation: C/C++ documentation:
* `Debugging <../debugging.html>`_ * `Debugging <../debugging.html>`_
* `Building from source <../building.html>`_ * `Building from source <../building.html>`_
API Changelog API Changelog
============= =============
.. include:: ../../../docs/index.md
:start-after: API Changelog `Changelog <../changelog.html>`_
Indices and tables Indices and tables
================== ==================

View File

@@ -2,4 +2,14 @@
%feature("autodoc", "3"); %feature("autodoc", "3");
#ifdef DOXYGEN
%include common_hpp_doc.i
%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
%include uart_class_doc.i
#endif
%include ../mraapython.i %include ../mraapython.i