mirror of
				https://github.com/eclipse/upm.git
				synced 2025-10-31 15:15:07 +03:00 
			
		
		
		
	bma250e: fix up some comments and error messages
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
		| @@ -381,7 +381,7 @@ upm_result_t bma250e_write_reg(const bma250e_context dev, | |||||||
|         if (mraa_spi_transfer_buf(dev->spi, pkt, NULL, 2)) |         if (mraa_spi_transfer_buf(dev->spi, pkt, NULL, 2)) | ||||||
|         { |         { | ||||||
|             _csOff(dev); |             _csOff(dev); | ||||||
|             printf("%s: mraa_spi_transfer_buf() failed.", |             printf("%s: mraa_spi_transfer_buf() failed.\n", | ||||||
|                    __FUNCTION__); |                    __FUNCTION__); | ||||||
|  |  | ||||||
|             return UPM_ERROR_OPERATION_FAILED; |             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)) |         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__); |                    __FUNCTION__); | ||||||
|             return UPM_ERROR_OPERATION_FAILED; |             return UPM_ERROR_OPERATION_FAILED; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -95,6 +95,7 @@ extern "C" { | |||||||
|      * @param addr The address for this device, or -1 for SPI. |      * @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 |      * @param cs The gpio pin to use for the SPI Chip Select.  Use -1 | ||||||
|      * for I2C or for SPI with a hardware controlled pin. |      * 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); |     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 |      * @param intr One of the BMA250E_INTERRUPT_PINS_T values | ||||||
|      * specifying which interrupt pin you are installing. |      * specifying which interrupt pin you are installing. | ||||||
|      * @param gpio GPIO pin to use as interrupt pin |      * @param gpio GPIO pin to use as interrupt pin | ||||||
|      * @param level The interrupt trigger level (one of mraa_gpio_edge_t |      * @param level The interrupt trigger level (one of the | ||||||
|      * values).  Make sure that you have configured the interrupt pin |      * mraa_gpio_edge_t values).  Make sure that you have configured | ||||||
|      * properly for whatever level you choose. |      * the interrupt pin properly for whatever level you choose. | ||||||
|      * @param isr The interrupt handler, accepting a void * argument |      * @param isr The interrupt handler, accepting a void * argument | ||||||
|      * @param arg The argument to pass to the interrupt handler |      * @param arg The argument to pass to the interrupt handler | ||||||
|      * @return UPM result. |      * @return UPM result. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jon Trulson
					Jon Trulson