Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    How to adapt coines_config_i2c_bus() function of coines.h libray

    NBG
    New Poster

    How to adapt coines_config_i2c_bus() function of coines.h libray

    Hi,

    I'm using a BME688 sensor with a CC2538. Im using Contiki operating system in my design. When I saw the Bosch-API for this sensor (https://github.com/BoschSensortec/BME68x-Sensor-API) I noticed that common.c/h file  used coines.h library. I don't want to use this library, so I have to adapt it to Contiki's way. I have to use the BME688 sensor always with I2C protocol (I don't need SPI parts), so I could adapt the functions "BME68X_INTF_RET_TYPE bme68x_i2c_read()" and "BME68X_INTF_RET_TYPE bme68x_i2c_write", but I didnt know how to do it with "int8_t bme68x_interface_init(struct bme68x_dev *bme, uint8_t intf)" function.

    Captura de pantalla de 2022-02-24 11-09-34.pngCaptura de pantalla de 2022-02-24 11-10-04.png

     

    Im having troubles with "coines_config_i2c_bus(COINES_I2C_BUS_0, COINES_I2C_STANDARD_MODE);" part. If anyone knows how I should adapt this function, it would be a great help.

    Thanks.

    In the photo I show how I think it has to be, except of this function.

    Captura de pantalla de 2022-02-24 11-01-44.png

    2 REPLIES 2
    BSTRobin
    Community Moderator

    Re: How to adapt coines_config_i2c_bus() function of coines.h libray

    Hi NBG,

    You could refer to the attached example code, which contains the implementation of I2C interface function on STM32.

    Rosso9
    Established Member

    Re: How to adapt coines_config_i2c_bus() function of coines.h libray

    Hi, I have the same problem. I'm tring to adapt the common.c file to my microcontroller (I'm using nRF52832 from Nordic) but I have some problems. Where can I fine the example code which contains the implementation of I2C interface function on STM32?

    Thanks for helping

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist