• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ EE_ReadVariable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: EE_ReadVariable

void ANO_Param::READ_GYRO_OFFSET(void)
{
	uint16_t temp[3];
	EE_ReadVariable(VirtAddVarTab[EE_6050_GYRO_X_OFFSET_ADDR], &temp[0]);
	EE_ReadVariable(VirtAddVarTab[EE_6050_GYRO_Y_OFFSET_ADDR], &temp[1]);
	EE_ReadVariable(VirtAddVarTab[EE_6050_GYRO_Z_OFFSET_ADDR], &temp[2]);
	mpu6050.Gyro_Offset.x = temp[0];
	mpu6050.Gyro_Offset.y = temp[1];
	mpu6050.Gyro_Offset.z = temp[2];
}
开发者ID:YuMeiLau,项目名称:UAV,代码行数:10,代码来源:ANO_Param.cpp


示例2: EE_READ_Attitude_PID

/*====================================================================================================*/
static void EE_READ_Attitude_PID(void)
{
	int16_t _temp;
	EE_ReadVariable(VirtAddVarTab[EE_PID_CORE_PITCH_P],&_temp);
	
	//  参数为0  说明已经清空flash  则使用默认参数
	if(_temp==0)  return;
	ctrl.pitch.core.kp =(float)_temp / 100;	
	EE_ReadVariable(VirtAddVarTab[EE_PID_CORE_PITCH_I],&_temp);
	ctrl.pitch.core.ki =(float)_temp / 1000;
	EE_ReadVariable(VirtAddVarTab[EE_PID_CORE_PITCH_D],&_temp);
	ctrl.pitch.core.kd = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_CORE_ROLL_P],&_temp);
	ctrl.roll.core.kp =(float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_CORE_ROLL_I],&_temp);
	ctrl.roll.core.ki = (float)_temp / 1000;	
	EE_ReadVariable(VirtAddVarTab[EE_PID_CORE_ROLL_D],&_temp);
	ctrl.roll.core.kd = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_CORE_YAW_P],&_temp);
	ctrl.yaw.core.kp =(float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_CORE_YAW_I],&_temp);
	ctrl.yaw.core.ki =(float)_temp / 1000;
	EE_ReadVariable(VirtAddVarTab[EE_PID_CORE_YAW_D], &_temp);
	ctrl.yaw.core.kd =(float)_temp / 100;
}
开发者ID:sensiki,项目名称:HT-Hawk,代码行数:26,代码来源:Algorithm_sqLite.c


示例3: readFlashParameter

/* read from flash and set --------------------------------------------------*/
u16 readFlashParameter(u16 para)
{
	u16 val;
	if (para == PARA_SET)
	{
		EE_ReadVariable(VirtAddVarTab[PARA_SET], &val);
		parameter[PARA_SET] = val;
	}
	else
	{		
		EE_ReadVariable(VirtAddVarTab[para+parameter[PARA_SET]], &val);
		parameter[para+parameter[PARA_SET]] = val;
	}
	return val;
}
开发者ID:changkyuya,项目名称:corvusm3,代码行数:16,代码来源:parameter.c


示例4: getHowMany

/*
 * Pobranie informacji o ilosci aktualnie zapisanych wcisniec
 * klawiszy
 */
void getHowMany(void)
{
	EE_ReadVariable(VirtAddVarTab[63], &howMany);
	if (howMany < 0x00 || howMany > 0x3F)
	{
		resetEEPROM();
		howMany = 0x00;
	}
}
开发者ID:synweap15,项目名称:PUT_PTM13_keyboard,代码行数:13,代码来源:main.c


示例5: conf_general_read_app_configuration

/**
 * Read app_configuration from EEPROM. If this fails, default values will be used.
 *
 * @param conf
 * A pointer to a app_configuration struct to write the read configuration to.
 */
void conf_general_read_app_configuration(app_configuration *conf) {
	bool is_ok = true;
	uint8_t *conf_addr = (uint8_t*)conf;
	uint16_t var;

	for (unsigned int i = 0;i < (sizeof(app_configuration) / 2);i++) {
		if (EE_ReadVariable(EEPROM_BASE_APPCONF + i, &var) == 0) {
			conf_addr[2 * i] = (var >> 8) & 0xFF;
			conf_addr[2 * i + 1] = var & 0xFF;
		} else {
开发者ID:nickman233,项目名称:bldc,代码行数:16,代码来源:conf_general.c


示例6: readFlashParameter

/* read from flash and set --------------------------------------------------*/
u16 readFlashParameter(u16 para)
{
	u16 val;
	if (para == PARA_SET)
	{
		EE_ReadVariable(VirtAddVarTab[PARA_SET], &val);
		parameter[PARA_SET] = val;
	}
	else
	{		
		EE_ReadVariable(VirtAddVarTab[para+parameter[PARA_SET]], &val);
		parameter[para+parameter[PARA_SET]] = val;
		// if we change the SW Parameter we have to init the filter
		if (para == PARA_SW) // = 4
		{
			initFilter(gyroAngle, copterAngle);
		}
	}
	return val;
}
开发者ID:changkyuya,项目名称:corvusm3,代码行数:21,代码来源:parameter.c


示例7: eeprom_read_block

void eeprom_read_block(void *__dst, const void *__src, size_t __n) {
  uint16_t data = 0xFF;
  uint16_t eeprom_address = (unsigned) __src;

  eeprom_init();

  for (uint8_t c = 0; c < __n; c++) {
    EE_ReadVariable(eeprom_address+c, &data);
    *((uint8_t*)__dst + c) = data;
  }
}
开发者ID:teemuatlut,项目名称:Marlin,代码行数:11,代码来源:EmulatedEeprom.cpp


示例8: eeprom_read_byte

uint8_t eeprom_read_byte(uint8_t *pos) {
  uint16_t data = 0xFF;
  uint16_t eeprom_address = (unsigned)pos;

  eeprom_init();

  if (EE_ReadVariable(eeprom_address, &data) != EE_OK) {
    return (unsigned char)data;
  }
  return (unsigned char)data;
}
开发者ID:teemuatlut,项目名称:Marlin,代码行数:11,代码来源:EmulatedEeprom.cpp


示例9: eeprom_restore

/* eeprom: 01,23,45 -> Read results: (10)(32)(54) -> buffer: 012345 */
uint8_t eeprom_restore(uint8_t *buf, uint8_t virt_addr)
{
	uint8_t i, retVal = 0;
	for(i=0; i<3; i++) {
		if (EE_ReadVariable(virt_addr + i, (uint16_t *) &buf[2*i])) {
			/* the variable was not found or no valid page was found */
			*((uint16_t *) &buf[2*i]) = 0xFFFF;
			retVal = 1;
		}
	}
	return retVal;
}
开发者ID:j1rie,项目名称:IRMP_STM32,代码行数:13,代码来源:main.c


示例10: setup_FLASH

void setup_FLASH()
{
	uint16_t tmp_eeprom_data_structure_version;
	FLASH_Unlock();
	EE_Init();
	EE_ReadVariable(VirtAddVarTab[index_eeprom_data_structure_version],&tmp_eeprom_data_structure_version);	//eeprom_data_structure_version lesen
	if (tmp_eeprom_data_structure_version != eeprom_data_structure_version)
	{
		EE_Format();
		EE_WriteVariable(VirtAddVarTab[index_eeprom_data_structure_version],eeprom_data_structure_version);
	}
}
开发者ID:EmbeddedFiedel,项目名称:Carrera_F407_Controlunit,代码行数:12,代码来源:Flash.cpp


示例11: main

/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
  /* STM32F103xB HAL library initialization:
       - Configure the Flash prefetch
       - Systick timer is configured by default as source of time base, but user 
         can eventually implement his proper time base source (a general purpose 
         timer for example or other time source), keeping in mind that Time base 
         duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and 
         handled in milliseconds basis.
       - Set NVIC Group Priority to 4
       - Low Level Initialization
     */
  HAL_Init();

  /* Configure the system clock to 64 MHz */
  SystemClock_Config();

  /* Unlock the Flash Program Erase controller */
  HAL_FLASH_Unlock();

  /* EEPROM Init */
  EE_Init();

/* --- Store successively many values of the three variables in the EEPROM ---*/
  /* Store 0x1000 values of Variable1 in EEPROM */
  for (VarValue = 1; VarValue <= 0x1000; VarValue++)
  {
    EE_WriteVariable(VirtAddVarTab[0], VarValue);
  }

  /* read the last stored variables data*/
  EE_ReadVariable(VirtAddVarTab[0], &VarDataTab[0]);


  /* Store 0x2000 values of Variable2 in EEPROM */
  for (VarValue = 1; VarValue <= 0x2000; VarValue++)
  {
    EE_WriteVariable(VirtAddVarTab[1], VarValue);
  }

  /* read the last stored variables data*/
  EE_ReadVariable(VirtAddVarTab[0], &VarDataTab[0]);
  EE_ReadVariable(VirtAddVarTab[1], &VarDataTab[1]);


  /* Store 0x3000 values of Variable3 in EEPROM */
  for (VarValue = 1; VarValue <= 0x3000; VarValue++)
  {
    EE_WriteVariable(VirtAddVarTab[2], VarValue);
  }

  /* read the last stored variables data*/
  EE_ReadVariable(VirtAddVarTab[0], &VarDataTab[0]);
  EE_ReadVariable(VirtAddVarTab[1], &VarDataTab[1]);
  EE_ReadVariable(VirtAddVarTab[2], &VarDataTab[2]);

  while (1)
  {
  };
}
开发者ID:NjordCZ,项目名称:STM32Cube_FW_F1,代码行数:65,代码来源:main.c


示例12: loadParameter

/* load Parameter from virtual EEPROM ---------------------------------------*/
void loadParameter()
{
	u16 val;
	u16 i;

	// test if flash is clear
	EE_ReadVariable(401, &val);
	if (val != 99)
	{
		loadDefault();
	}
	EE_WriteVariable(401, 99);
	
	for (i = 0;i <= USED_PARAMETER; i++)
	{
		EE_ReadVariable(VirtAddVarTab[i], &val);
		parameter[i] = val;
		// for test
		print_para(i);
		Delay(2); // prevent txbuffer overvlow
	}
}
开发者ID:changkyuya,项目名称:corvusm3,代码行数:23,代码来源:parameter.c


示例13: display_info_get

void display_info_get(uint8_t *distortion_type, uint8_t *buf)
{
    bool found_display_info = 1;
    uint16_t temp_distortion = default_distortion_type;
    EE_ReadVariable(EE_DISPLAY_INFO_DISTORTION_TYPE, &temp_distortion);
    *distortion_type = temp_distortion;

    uint16_t *readbuf = (uint16_t *)buf;

    for (uint8_t i = 0; i < EE_DISPLAY_INFO_SIZE; i++) {
        if (EE_ReadVariable(EE_DISPLAY_INFO_START+i, &readbuf[i])) {
            found_display_info = 0;
            break;
        }
    }

    // if display info stuff wasn't found in EEPROM, load the defaults
    if (!found_display_info) {
        // offset back to the start of the buffer
        generate_default_display_info(buf-4);
    }
}
开发者ID:2zuckerberg,项目名称:RiftDK1,代码行数:22,代码来源:display_info.c


示例14: getConfig

void getConfig()
{
	FLASH_Unlock();

	uint16_t i;

	uint16_t *ptr;
	EE_Init();
	EE_ReadVariable(EADDR_IS_INITIALIZED,&i);
	if(i != 0x5253)
	{
		//empty or corrupted EEPROM detected: write default config
		//EE_Format();
		EE_WriteVariable(EADDR_IS_INITIALIZED, 0x5253);
		s.commutationMethod = commutationMethod_HALL;
		s.inputMethod = inputMethod_stepDir;
		s.encoder_PPR = 4000;
		s.encoder_poles = 4;
		s.encoder_counts_per_step = 10;
		s.pid_Kp = 10;
		s.pid_Ki = 0;
		s.pid_Kd = 0;
		s.usart_baud = 1152;
		writeConfig(s);
		return;

	}
	ptr = (uint16_t *)&s;
	for(i=0; i<sizeof(servoConfig)/2;i++)
	{

		if(EE_ReadVariable(EADDR_CONFIG_START+i, ptr)!=0)
			usart_sendStr("Flash Error\n\r");
		ptr++;
	}

	return;

}
开发者ID:yikedz,项目名称:bldc-drive,代码行数:39,代码来源:configuration.c


示例15: eeprom_restore

/* eeprom: 01,23,45 -> Read results: (10)(32)(54) -> memcpy 01|23|45 -> buffer: 012345 */
uint8_t eeprom_restore(uint8_t *buf, uint8_t virt_addr)
{
	uint8_t i, retVal = 0;
	uint16_t EE_Data;
	for(i=0; i<3; i++) {
		if (EE_ReadVariable(virt_addr + i, &EE_Data)) {
			/* the variable was not found or no valid page was found */
			EE_Data = 0xFFFF;
			retVal = 1;
		}
		memcpy(&buf[2*i], &EE_Data, 2);
	}
	return retVal;
}
开发者ID:M-Reimer,项目名称:IRMP_STM32,代码行数:15,代码来源:main.c


示例16: EE_READ_MAG_OFFSET

/*====================================================================================================*/
static void EE_READ_MAG_OFFSET(void)
{
	EE_ReadVariable(VirtAddVarTab[3], &HMC58X3_limit[0]);
	EE_ReadVariable(VirtAddVarTab[4], &HMC58X3_limit[1]);
	EE_ReadVariable(VirtAddVarTab[5], &HMC58X3_limit[2]);
	EE_ReadVariable(VirtAddVarTab[6], &HMC58X3_limit[3]);
	EE_ReadVariable(VirtAddVarTab[7], &HMC58X3_limit[4]);
	EE_ReadVariable(VirtAddVarTab[8], &HMC58X3_limit[5]);
}
开发者ID:sensiki,项目名称:HT-Hawk,代码行数:10,代码来源:Algorithm_sqLite.c


示例17: EE_Read_ACC_GYRO_Offset

void EE_Read_ACC_GYRO_Offset(void)
{
	EE_ReadVariable(VirtAddVarTab[EE_ACC_X_OFFSET], (u16 *)(&mpu_info.offset_acc.x));
	EE_ReadVariable(VirtAddVarTab[EE_ACC_Y_OFFSET], (u16 *)(&mpu_info.offset_acc.y));
	EE_ReadVariable(VirtAddVarTab[EE_ACC_Z_OFFSET], (u16 *)(&mpu_info.offset_acc.z));
	EE_ReadVariable(VirtAddVarTab[EE_GYRO_X_OFFSET], (u16 *)(&mpu_info.offset_gyro.x));
	EE_ReadVariable(VirtAddVarTab[EE_GYRO_Y_OFFSET], (u16 *)(&mpu_info.offset_gyro.y));
	EE_ReadVariable(VirtAddVarTab[EE_GYRO_Z_OFFSET], (u16 *)(&mpu_info.offset_gyro.z));
}
开发者ID:imTim12138,项目名称:Nev-Rocker,代码行数:9,代码来源:func.c


示例18: loadParameter

/* load Parameter from virtual EEPROM ---------------------------------------*/
void loadParameter()
{
	u16 val;
	u16 i;

	
	for (i = 0;i <= USED_PARAMETER; i++)
	{
		EE_ReadVariable(VirtAddVarTab[i], &val);
		parameter[i] = val;
		// for test
		print_para(i);
		Delay(2); // prevent txbuffer overvlow
	}
}
开发者ID:changkyuya,项目名称:corvusm3,代码行数:16,代码来源:parameter.c


示例19: EE_TransferVariable

static uint16_t EE_TransferVariable(uint16_t VirtAddress, uint32_t BaseAddress)
{
  if (( *(__IO uint16_t*)(BaseAddress + 6)) != VirtAddress)
  {
    /* Read the last variables' updates */
    uint16_t ReadStatus = EE_ReadVariable(VirtAddress, &DataVar);
    /* In case variable corresponding to the virtual address was found */
    if (ReadStatus != 0x1)
    {
      /* Transfer the variable to the new page */
      return EE_VerifyPageFullWriteVariable(VirtAddress, DataVar);
    }
  }

  return FLASH_COMPLETE;
}
开发者ID:2zuckerberg,项目名称:RiftDK1,代码行数:16,代码来源:eeprom.c


示例20: EE_READ_PID

void EE_READ_PID(void)
{
	u16 _temp;
	EE_ReadVariable(VirtAddVarTab[EE_PID_ROL_P],&_temp);
	PID_ROL.P = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_ROL_I],&_temp);
	PID_ROL.I = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_ROL_D],&_temp);
	PID_ROL.D = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_PIT_P],&_temp);
	PID_PIT.P = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_PIT_I],&_temp);
	PID_PIT.I = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_PIT_D],&_temp);
	PID_PIT.D = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_YAW_P],&_temp);
	PID_YAW.P = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_YAW_I],&_temp);
	PID_YAW.I = (float)_temp / 100;
	EE_ReadVariable(VirtAddVarTab[EE_PID_YAW_D],&_temp);
	PID_YAW.D = (float)_temp / 100;
}
开发者ID:JokerGeek,项目名称:Raging_Fire_Quad-rotor,代码行数:22,代码来源:BSP.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ EFI_PAGES_TO_SIZE函数代码示例发布时间:2022-05-30
下一篇:
C++ ED_space_clip_get_clip函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap