bma250e: fix up some comments and error messages

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson 2017-03-29 13:13:14 -06:00
parent 3d0461b40a
commit 7d789ec208
2 changed files with 6 additions and 5 deletions

View File

@ -381,7 +381,7 @@ upm_result_t bma250e_write_reg(const bma250e_context dev,
if (mraa_spi_transfer_buf(dev->spi, pkt, NULL, 2))
{
_csOff(dev);
printf("%s: mraa_spi_transfer_buf() failed.",
printf("%s: mraa_spi_transfer_buf() failed.\n",
__FUNCTION__);
return UPM_ERROR_OPERATION_FAILED;
@ -392,7 +392,7 @@ upm_result_t bma250e_write_reg(const bma250e_context dev,
{
if (mraa_i2c_write_byte_data(dev->i2c, val, reg))
{
printf("%s: mraa_i2c_write_byte_data() failed.",
printf("%s: mraa_i2c_write_byte_data() failed.\n",
__FUNCTION__);
return UPM_ERROR_OPERATION_FAILED;
}

View File

@ -95,6 +95,7 @@ extern "C" {
* @param addr The address for this device, or -1 for SPI.
* @param cs The gpio pin to use for the SPI Chip Select. Use -1
* for I2C or for SPI with a hardware controlled pin.
* @return The device context, or NULL if an error occurred.
*/
bma250e_context bma250e_init(int bus, int addr, int cs);
@ -575,9 +576,9 @@ extern "C" {
* @param intr One of the BMA250E_INTERRUPT_PINS_T values
* specifying which interrupt pin you are installing.
* @param gpio GPIO pin to use as interrupt pin
* @param level The interrupt trigger level (one of mraa_gpio_edge_t
* values). Make sure that you have configured the interrupt pin
* properly for whatever level you choose.
* @param level The interrupt trigger level (one of the
* mraa_gpio_edge_t values). Make sure that you have configured
* the interrupt pin properly for whatever level you choose.
* @param isr The interrupt handler, accepting a void * argument
* @param arg The argument to pass to the interrupt handler
* @return UPM result.