hw/bsp/blueberry/src/hal_bsp.c
int
config_hts221_sensor(void)
{
#if MYNEWT_VAL(HTS221_ONB)
    int rc;
    struct os_dev *dev;
    struct hts221_cfg cfg;

    dev = (struct os_dev *) os_dev_open("hts221_0", OS_TIMEOUT_NEVER, NULL);
    assert(dev != NULL);

    memset(&cfg, 0, sizeof(cfg));

    cfg.mask = SENSOR_TYPE_RELATIVE_HUMIDITY|SENSOR_TYPE_TEMPERATURE;
    cfg.int_enable = 0;

    rc = hts221_config((struct hts221 *)dev, &cfg);
    SYSINIT_PANIC_ASSERT(rc == 0);

    os_dev_close(dev);
#endif
    return 0;
}
/**
 * HTS221 Sensor default configuration
 *
 * @return 0 on success, non-zero on failure
 */
HTS221 Sensor default configuration
@return 0 on success, non-zero on failure
HTS221 Sensor default configuration @return 0 on success non - zero on failure
int
config_hts221_sensor(void)
{
#if MYNEWT_VAL(HTS221_ONB)
    int rc;
    struct os_dev *dev;
    struct hts221_cfg cfg;
    dev = (struct os_dev *) os_dev_open("hts221_0", OS_TIMEOUT_NEVER, NULL);
    assert(dev != NULL);
    memset(&cfg, 0, sizeof(cfg));
    cfg.mask = SENSOR_TYPE_RELATIVE_HUMIDITY|SENSOR_TYPE_TEMPERATURE;
    cfg.int_enable = 0;
    rc = hts221_config((struct hts221 *)dev, &cfg);
    SYSINIT_PANIC_ASSERT(rc == 0);
    os_dev_close(dev);
#endif
    return 0;
}
int config_hts221_sensor ( void ) { #if MYNEWT_VAL ( HTS221_ONB ) int rc ; struct os_dev * dev ; struct hts221_cfg cfg ; dev = ( struct os_dev * ) os_dev_open ( " " , OS_TIMEOUT_NEVER , NULL ) ; assert ( dev != NULL ) ; memset ( & cfg , 0 , sizeof ( cfg ) ) ; cfg . mask = SENSOR_TYPE_RELATIVE_HUMIDITY | SENSOR_TYPE_TEMPERATURE ; cfg . int_enable = 0 ; rc = hts221_config ( ( struct hts221 * ) dev , & cfg ) ; SYSINIT_PANIC_ASSERT ( rc == 0 ) ; os_dev_close ( dev ) ; #endif return 0 ; }
HTS221 Sensor default configuration
 @return 0 on success, non-zero on failure
HTS221 Sensor default configuration @return 0 on success non - zero on failure