Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
1,055 Views

what exactly does mraa_gpio_init() do?

Jump to solution

Hi,

In the MRAA library and the function mraa_gpio_inti() - what exactly is being initialized? What is happening under the covers in both software and hardware?

Thanks

0 Kudos

Accepted Solutions
Highlighted
Community Manager
23 Views

Hello conor100,

 

 

Thank you for interest in the Intel® Edison Breakout Board.

 

 

The mraa_gpio_init() function initializes a general purpose Input/Output based on the board number pin (number inside the parenthesis). It helps relate a specific pin from the board to a certain task, via coding.

 

 

This link provides the mraa number for each pin of your Edison board: https://iotdk.intel.com/docs/master/mraa/edison.html.

 

 

For more detailed information, please check the following links:

 

https://iotdk.intel.com/docs/master/mraa/gpio_8h.html# a3a9422482a810500cbbe192925574758

 

https://iotdk.intel.com/docs/master/mraa/classmraa_1_1_gpio.html

 

 

For example, this code: https://github.com/intel-iot-devkit/mraa/blob/master/examples/gpio_read6.c, helps the programmer read data form pin 6 (pin J17-7/GP27 of the Edison board) through the mraa_gpio_init(6) function.

 

 

I hope you find the previous information useful.

 

 

Regards,

 

Andres

View solution in original post

0 Kudos
1 Reply
Highlighted
Community Manager
24 Views

Hello conor100,

 

 

Thank you for interest in the Intel® Edison Breakout Board.

 

 

The mraa_gpio_init() function initializes a general purpose Input/Output based on the board number pin (number inside the parenthesis). It helps relate a specific pin from the board to a certain task, via coding.

 

 

This link provides the mraa number for each pin of your Edison board: https://iotdk.intel.com/docs/master/mraa/edison.html.

 

 

For more detailed information, please check the following links:

 

https://iotdk.intel.com/docs/master/mraa/gpio_8h.html# a3a9422482a810500cbbe192925574758

 

https://iotdk.intel.com/docs/master/mraa/classmraa_1_1_gpio.html

 

 

For example, this code: https://github.com/intel-iot-devkit/mraa/blob/master/examples/gpio_read6.c, helps the programmer read data form pin 6 (pin J17-7/GP27 of the Edison board) through the mraa_gpio_init(6) function.

 

 

I hope you find the previous information useful.

 

 

Regards,

 

Andres

View solution in original post

0 Kudos