docs: few touch ups and typos fixed

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Mihai Tudor Panu 2015-03-04 11:22:56 -08:00
parent 9dcef6d7bb
commit b4c265005f
6 changed files with 23 additions and 19 deletions

View File

@ -11,8 +11,8 @@ Here are the rules of contribution:
avoid GPL. (LGPL is fine). If your license is not MIT please include a avoid GPL. (LGPL is fine). If your license is not MIT please include a
LICENSE file in src/mymodule/. LICENSE file in src/mymodule/.
- Please test your module builds before contributing and make sure it works on - Please test your module builds before contributing and make sure it works on
the latest version of mraa. If you tested on a specific board/platform please the latest version of libmraa. If you tested on a specific board/platform
tell us what this was in your PR. please tell us what this was in your PR.
- Try not to break master. In any commit. - Try not to break master. In any commit.
- Attempt to have some decent API documentation as described in the the @ref - Attempt to have some decent API documentation as described in the the @ref
documentation [guide](documentation.md). documentation [guide](documentation.md).

View File

@ -15,7 +15,7 @@ New libraries must have the "@brief", "@defgroup" and "@ingroup" tags in one
block. This usually follows the namespace and it is common to have one sensor block. This usually follows the namespace and it is common to have one sensor
per library. per library.
Here's how this looks: Here's how this looks (disregard the "@verbatim" tags in your actual code):
``` ```
@verbatim @verbatim
@ -50,8 +50,9 @@ this example:
``` ```
Libraries with multiple sensors can add specific "@ingroup" tags here, but make Libraries with multiple sensors can add specific "@ingroup" tags here, but make
sure that the first one is the "<name>" specified in the library "@defgroup" sure that the first one is the name specified in the library "@defgroup" tag.
tag. An example of such a library for reference is our libupm-i2clcd. Also, add this block to every sensor. An example of such a library for
reference is our libupm-i2clcd, which acts as a driver for multiple I2C LCDs.
Optionally, a small representative image can be placed in the "docs/images" Optionally, a small representative image can be placed in the "docs/images"
subfolder. **Please do not use existing, copyrighted images with your sensors!** subfolder. **Please do not use existing, copyrighted images with your sensors!**

View File

@ -2,7 +2,7 @@ Making a UPM module for MAX31855 {#max31855}
================================ ================================
The Maxim Integrated MAX31855 is a thermocouple amplifier allowing you to read The Maxim Integrated MAX31855 is a thermocouple amplifier allowing you to read
from a K type themocouple. My board comes from the Pmod kit form Maxim from a K type thermocouple. My board comes from the Pmod kit form Maxim
(MAX31855PMB1) but you can get this from many different sources. The adafruit (MAX31855PMB1) but you can get this from many different sources. The adafruit
people made arduino code already so we'll use that as a people made arduino code already so we'll use that as a
[reference](https://github.com/adafruit/Adafruit-MAX31855-library/blob/master/Adafruit_MAX31855.cpp). [reference](https://github.com/adafruit/Adafruit-MAX31855-library/blob/master/Adafruit_MAX31855.cpp).
@ -69,7 +69,7 @@ the implementation of MAX31855::getTemp()
Then using the arduino code as reference we simply reconstruct form the 4 Then using the arduino code as reference we simply reconstruct form the 4
uint8_t values a 32bit int value and select only the valuable parts of uint8_t values a 32bit int value and select only the valuable parts of
information from that. The MAX31855 datahseet explains exactly which bits are information from that. The MAX31855 datasheet explains exactly which bits are
useful, we will just do the same as the adafruit code, first checking the error useful, we will just do the same as the adafruit code, first checking the error
bit and then scrapping everything but the 14bit of thermocouple data that are bit and then scrapping everything but the 14bit of thermocouple data that are
useful to us and converting it to a double. useful to us and converting it to a double.
@ -78,7 +78,7 @@ useful to us and converting it to a double.
### Finalizing ### Finalizing
Our final example, very easy to use api! Our final example, very easy to use API!
@snippet examples/max31855.cxx Interesting @snippet examples/max31855.cxx Interesting
@ -92,6 +92,6 @@ include_directories (${PROJECT_SOURCE_DIR}/src/max31855)
target_link_libraries (max31855-example max31855 ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries (max31855-example max31855 ${CMAKE_THREAD_LIBS_INIT})
~~~~~~~~~~~ ~~~~~~~~~~~
Note you dont have to rebuild everything, cmake keeps target lists so if you Note you don't have to rebuild everything, cmake keeps target lists so if you
named your example target modulename-example you can simply do make named your example target modulename-example you can simply do make
max31855-example and both the library & example will build. max31855-example and both the library & example will build.

View File

@ -1,7 +1,7 @@
Naming a module {#naming} Naming a module {#naming}
=============== ===============
UPM attemps to follow a clear naming pattern. Modules should be sensibly named UPM attempts to follow a clear naming pattern. Modules should be sensibly named
and then placed in ${libdir}/upm and headers in ${includedir}/upm, all modules and then placed in ${libdir}/upm and headers in ${includedir}/upm, all modules
should be prefixed with libupm-<modulename>. The upm_module_init will should be prefixed with libupm-<modulename>. The upm_module_init will
automatically name python UPM modules as pyupm_<modulename> and javascript automatically name python UPM modules as pyupm_<modulename> and javascript
@ -24,6 +24,9 @@ sensor can inherit your class if they only have minor changes.
### Doubt ### Doubt
If ever, give me a ping via email: brendan.le.foll@intel.com and I'll try If ever, give either of us a ping via email:
suggest decent names for your module. mihai.tudor.panu@intel.com
john.r.van.drasek@intel.com
brendan.le.foll@intel.com
and we'll try suggest decent names for your module.

View File

@ -3,7 +3,7 @@ Porting a module from Arduino {#porting}
Porting arduino libraries to libmraa as UPM libraries is usually fairly easy. Porting arduino libraries to libmraa as UPM libraries is usually fairly easy.
The issues typically come from misunderstanding of how a non real time OS deals The issues typically come from misunderstanding of how a non real time OS deals
with interupts and timers. It also highly depends on the sensor. A concrete with interrupts and timers. It also highly depends on the sensor. A concrete
example is explained in detail on @ref max31855 example is explained in detail on @ref max31855
### Adding a new module to UPM ### Adding a new module to UPM
@ -36,9 +36,9 @@ required to talk to the board's IO. An I2c sensor will create a
mraa_i2c_context, keep it as a private member and require a bus number and slave mraa_i2c_context, keep it as a private member and require a bus number and slave
address in it's constructor. address in it's constructor.
Typically in sensors a simple object->read() function is prefered, depending on Typically in sensors a simple object->read() function is preferred, depending on
your sensor/actuaotr this may or may not be easy or not even make sense. Most your sensor/actuator this may or may not be easy or not even make sense. Most
UPM apis have a simple set of functions. UPM APIs have a simple set of functions.
### Mapping arduino API to libmraa ### Mapping arduino API to libmraa
@ -59,7 +59,7 @@ the UPM build system.
The last step is when you're happy with your module and it works send us a pull The last step is when you're happy with your module and it works send us a pull
request! We'd love to include your sensor in our repository. request! We'd love to include your sensor in our repository.
If you don't like github you can also send brendan.le.foll@intel.com a git If you don't like github you can also send mihai.tudor.panu@intel.com a git
formatted patch if your sensor. More details are on @ref contributions and on formatted patch of your sensor. More details are on @ref contributions and on
https://help.github.com/articles/creating-a-pull-request https://help.github.com/articles/creating-a-pull-request

View File

@ -338,6 +338,6 @@
/** /**
* @brief Grove Starter Kit * @brief Grove Starter Kit
* @defgroup grovesk Grove Starter Kit * @defgroup gsk Grove Starter Kit
* @ingroup bykit * @ingroup bykit
*/ */