当前位置: 首页>>代码示例>>C++>>正文


C++ I2CRead函数代码示例

本文整理汇总了C++中I2CRead函数的典型用法代码示例。如果您正苦于以下问题:C++ I2CRead函数的具体用法?C++ I2CRead怎么用?C++ I2CRead使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了I2CRead函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: get_wathgod_expired

/***************************************************************************
 *
 * Function : get_wathgod_expired
 *
 * RET  : Return the value of register SwitchOffStatus
 *
 * Notes : From register 0x0F00, bits 3:3
 *
 **************************************************************************/
unsigned char get_wathgod_expired()
  {
    unsigned char value;


    /* 
     * STw4500 has switched off due to primary watchdog has 
     * expired. 
     */ 
    value = (I2CRead(SWITCH_OFF_STATUS_REG) & WATHGOD_EXPIRED_PARAM_MASK) >> 3;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_RTC.c

示例2: get_battery_temperature_low

/***************************************************************************
 *
 * Function : get_battery_temperature_low
 *
 * RET  : Return the value of register InterruptSource19
 *
 * Notes : From register 0x0E12, bits 0:0
 *
 **************************************************************************/
unsigned char get_battery_temperature_low()
  {
    unsigned char value;


    /* 
     * 0: Btemp > BtempLow 
     * 1: BtempLow > Btemp 
     */ 
    value = (I2CRead(INTERRUPT_SOURCE_19_REG) & BATTERY_TEMPERATURE_LOW_INTERRUPT_PARAM_MASK);
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_Interrupt.c

示例3: get_charging_current_limited_hs_chirp

/***************************************************************************
 *
 * Function : get_charging_current_limited_hs_chirp
 *
 * RET  : Return the value of register InterruptSource22
 *
 * Notes : From register 0x0E15, bits 6:6
 *
 **************************************************************************/
unsigned char get_charging_current_limited_hs_chirp()
  {
    unsigned char value;


    /* 
     * 0: inactive 
     * 1: charging current is limited in HS or Chirp modes. 
     */ 
    value = (I2CRead(INTERRUPT_SOURCE_22_REG) & CHARGING_CURRENT_LIMITED_HS_CHIRP_ENABLE_PARAM_MASK) >> 6;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_Interrupt.c

示例4: get_adp_sense_off

/***************************************************************************
 *
 * Function : get_adp_sense_off
 *
 * RET  : Return the value of register InterruptSource12
 *
 * Notes : From register 0x0E09, bits 4:4
 *
 **************************************************************************/
unsigned char get_adp_sense_off()
  {
    unsigned char value;


    /* 
     * 0: Current source Off 
     * 1: Current source On 
     */ 
    value = (I2CRead(INTERRUPT_SOURCE_12_REG) & CURRENT_SOURCE_ON_PARAM_MASK) >> 4;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_Interrupt.c

示例5: get_battery_temperature_medium_high

/***************************************************************************
 *
 * Function : get_battery_temperature_medium_high
 *
 * RET  : Return the value of register InterruptSource19
 *
 * Notes : From register 0x0E12, bits 2:2
 *
 **************************************************************************/
unsigned char get_battery_temperature_medium_high()
  {
    unsigned char value;


    /* 
     * 0: Btemp < BtempMedium or Btemp > BtempHigh 
     * 1: BtempHigh > Btemp > BtempMedium 
     */ 
    value = (I2CRead(INTERRUPT_SOURCE_19_REG) & BATTERY_TEMPERATURE_MEDIUM_HIGH_INTERRUPT_PARAM_MASK) >> 2;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_Interrupt.c

示例6: get_long_pressure

/***************************************************************************
 *
 * Function : get_long_pressure
 *
 * RET  : Return the value of register SwitchOffStatus
 *
 * Notes : From register 0x0F00, bits 6:6
 *
 **************************************************************************/
unsigned char get_long_pressure()
  {
    unsigned char value;


    /* 
     * STw4500 has switched off with a PonKey1 pressure longer 
     * than 10 s. 
     */ 
    value = (I2CRead(SWITCH_OFF_STATUS_REG) & LONG_PRESSURE_PARAM_MASK) >> 6;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_RTC.c

示例7: get_low_battery

/***************************************************************************
 *
 * Function : get_low_battery
 *
 * RET  : Return the value of register SwitchOffStatus
 *
 * Notes : From register 0x0F00, bits 5:5
 *
 **************************************************************************/
unsigned char get_low_battery()
  {
    unsigned char value;


    /* 
     * STw4500 has switched off due to a battery level lower 
     * than PornVbat threshold. 
     */ 
    value = (I2CRead(SWITCH_OFF_STATUS_REG) & LOW_BATTERY_PARAM_MASK) >> 5;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_RTC.c

示例8: get_switch_cmd_off

/***************************************************************************
 *
 * Function : get_switch_cmd_off
 *
 * RET  : Return the value of register SwitchOffStatus
 *
 * Notes : From register 0x0F00, bits 0:0
 *
 **************************************************************************/
unsigned char get_switch_cmd_off()
  {
    unsigned char value;


    /* 
     * STw4500 has switched off with ‘Swoff’.bit of STw4500Ctrl1 
     * register. 
     */ 
    value = (I2CRead(SWITCH_OFF_STATUS_REG) & SWITCH_CMD_OFF_PARAM_MASK);
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_RTC.c

示例9: get_rtc_read_request

/***************************************************************************
 *
 * Function : get_rtc_read_request
 *
 * RET  : Return the value of register RTCReadRequest
 *
 * Notes : From register 0x0F02, bits 0:0
 *
 **************************************************************************/
unsigned char get_rtc_read_request()
  {
    unsigned char value;


    /* 
     * RTC data read transfer is required 
     * Cleared upon data transfert in watchtim register is done 
     */ 
    value = (I2CRead(RTC_READ_REQUEST_REG) & RTC_READ_ENABLE_PARAM_MASK);
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_RTC.c

示例10: get_rtc_thermal_protection

/***************************************************************************
 *
 * Function : get_rtc_thermal_protection
 *
 * RET  : Return the value of register SwitchOffStatus
 *
 * Notes : From register 0x0F00, bits 1:1
 *
 **************************************************************************/
unsigned char get_rtc_thermal_protection()
  {
    unsigned char value;


    /* 
     * STw4500 has switched off due to Thermal protection 
     * activation. 
     */ 
    value = (I2CRead(SWITCH_OFF_STATUS_REG) & THERMAL_PROTECTION_PARAM_MASK) >> 1;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_RTC.c

示例11: get_battery_very_low

/***************************************************************************
 *
 * Function : get_battery_very_low
 *
 * RET  : Return the value of register SwitchOffStatus
 *
 * Notes : From register 0x0F00, bits 2:2
 *
 **************************************************************************/
unsigned char get_battery_very_low()
  {
    unsigned char value;


    /* 
     * STw4500 has switched off due to a VbatA ball level lower 
     * than BattOk falling threshold. 
     */ 
    value = (I2CRead(SWITCH_OFF_STATUS_REG) & BATTERY_VERY_LOW_PARAM_MASK) >> 2;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_RTC.c

示例12: get_oscillator32k_status

/***************************************************************************
 *
 * Function : get_oscillator32k_status
 *
 * RET  : Return the value of register RtcDerivation
 *
 * Notes : From register 0x0F0F, bits 2:2
 *
 **************************************************************************/
unsigned char get_oscillator32k_status()
  {
    unsigned char value;


    /* 
     * 0: Xtal 32khz oscillator is stopped 
     * 1: Xtal 32khz oscillator is running 
     */ 
    value = (I2CRead(RTC_DERIVATION_REG) & OSCILLATOR_3_2K_STATUS_PARAM_MASK) >> 2;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_RTC.c

示例13: get_modem_i2c_clock_pullup

/***************************************************************************
 *
 * Function : get_modem_i2c_clock_pullup
 *
 * RET  : Return the value of register I2cPadControl
 *
 * Notes : From register 0x1067, bits 0:0
 *
 **************************************************************************/
unsigned char get_modem_i2c_clock_pullup()
  {
    unsigned char value;


    /* 
     * 0: enable internal pull-up 
     * 1: Disable internal pull-up 
     */ 
    value = (I2CRead(I_2C_PAD_CONTROL_REG) & MODEM_I_2C_PULLUP_ENABLE_PARAM_MASK);
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_Miscellanous.c

示例14: get_ape_i2c_data_pullup

/***************************************************************************
 *
 * Function : get_ape_i2c_data_pullup
 *
 * RET  : Return the value of register I2cPadControl
 *
 * Notes : From register 0x1067, bits 3:3
 *
 **************************************************************************/
unsigned char get_ape_i2c_data_pullup()
  {
    unsigned char value;


    /* 
     * 0: enable internal pull-up 
     * 1: Disable internal pull-up 
     */ 
    value = (I2CRead(I_2C_PAD_CONTROL_REG) & APE_I_2C_DATA_PULLUP_ENABLE_PARAM_MASK) >> 3;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab8500_Miscellanous.c

示例15: get_acc_detect_pullup_supply

/***************************************************************************
 *
 * Function : get_acc_detect_pullup_supply
 *
 * RET  : Return the value of register 0xAccDetect3
 *
 * Notes : From register 0x882, bits 1:1
 *
 **************************************************************************/
unsigned char get_acc_detect_pullup_supply()
  {
    unsigned char value;


    /* 
     * 0: disable AccDetect2 Pull-up 2.1v supply 
     * 1: enable AccDetect2 Pull-up 2.1v supply 
     */ 
    value = (I2CRead(ACC_DETECT_3_REG) & ACC_DETECT_PULLUP_SUPPLY_MASK) >> 1;
    return value;
  }
开发者ID:Meticulus,项目名称:vendor_st-ericsson_u8500,代码行数:21,代码来源:ab9540_Accessory.c


注:本文中的I2CRead函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。