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

C++ eeprom_update_byte函数代码示例

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

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



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

示例1: gui_layouts_action

void gui_layouts_action(uint8_t index)
{
	switch(index)
	{
	case(0):
		gui_switch_task(GUI_SET_WIDGETS);
	break;

	case(1):
		gui_switch_task(GUI_SET_LAYOUT);
	break;

	case(2):
		gui_value_conf_P(PSTR("Pages count"), GUI_VAL_NUMBER, PSTR("%1.0f"), config.gui.number_of_pages, 1, MAX_NUMBER_OF_PAGES, 1, gui_set_layouts_pages_cb);
		gui_switch_task(GUI_SET_VAL);
	break;

	case(3):
		config.gui.silent ^= (1 << active_page);
		eeprom_busy_wait();
		eeprom_update_byte(&config_ee.gui.silent, config.gui.silent);
	break;

	case(4):
		config.gui.hide_label ^= (1 << active_page);
		eeprom_busy_wait();
		eeprom_update_byte(&config_ee.gui.hide_label, config.gui.hide_label);
	break;
	}
}
开发者ID:DD1984,项目名称:skydrop_stm32,代码行数:30,代码来源:layouts.cpp


示例2: gui_set_logger_action

void gui_set_logger_action(uint8_t index)
{
	switch(index)
	{
		case(0):
			config.logger.enabled = !config.logger.enabled;
			eeprom_busy_wait();
			eeprom_update_byte(&config_ee.logger.enabled, config.logger.enabled);
		break;

		case(1):
			if (fc.logger_state == FLIGHT_LAND)
			{
				gui_showmessage_P(PSTR("Cannot change\nin flight!"));
				return;
			}
			config.logger.format = (config.logger.format + 1) % NUMBER_OF_FORMATS;
			eeprom_busy_wait();
			eeprom_update_byte(&config_ee.logger.format, config.logger.format);
		break;

		case(2):
			gui_switch_task(GUI_SET_AUTOSTART);
		break;
	}
}
开发者ID:MaxNero,项目名称:SkyDrop,代码行数:26,代码来源:set_logger.cpp


示例3: rfReceivePacket

static bool rfReceivePacket(NWK_DataInd_t *ind) {
	// First figure out what kind of packet this is, and then call the appropreate function.
	switch ((packetType_t) (ind->data[0])) {
	case bacon:
		processBaconPacket(ind);
		break;
	case connectionAck:
		if(processConnectionAck(ind)) {
			ui_baseStationConnected();
			eeprom_update_block(&(baseStationList[connectedBaseStation]), (void*)27, sizeof(struct baseStation));
			eeprom_update_byte((uint8_t*)29, 1); // Force the RSSI of the connected base station to 1 without modifying value in ram.
			eeprom_update_byte((uint8_t*)26, 0xFF);
		}
		break;
	case dataRequest:
		if (ind->size != sizeof(dataRequestPacket_t))
			break;
		memcpy(&datRequest, ind->data, sizeof(dataRequestPacket_t));
		receivedDataRequest = true;
		return false;
		break;
	case dataAck:
		handleDataAck(ind);
		break;
	case coldStart:
		receivedColdStart = true;
		break;
	default:
		break;
	}

	return true;
}
开发者ID:BennettRand,项目名称:Dr-Wattson,代码行数:33,代码来源:main.c


示例4: gui_set_bluetooth_action

void gui_set_bluetooth_action(uint8_t index)
{
	switch (index)
	{
		case(1):
			config.system.use_bt = !config.system.use_bt;
			eeprom_busy_wait();
			eeprom_update_byte(&config_ee.system.use_bt, config.system.use_bt);

			if (config.system.use_bt)
				bt_module_init();
			else
				bt_module_deinit();
		break;

		case(2):
			config.system.protocol = (config.system.protocol + 1) % NUMBER_OF_PROTOCOLS;
			eeprom_busy_wait();
			eeprom_update_byte(&config_ee.system.protocol, config.system.protocol);
		break;

		case(3):
			config.system.forward_gps = !config.system.forward_gps;
			eeprom_busy_wait();
			eeprom_update_byte(&config_ee.system.forward_gps, config.system.forward_gps);
		break;
	}
}
开发者ID:MaxNero,项目名称:SkyDrop,代码行数:28,代码来源:set_bluetooth.cpp


示例5: gui_set_advanced_action

void gui_set_advanced_action(uint8_t index)
{
	switch(index)
	{
	case(0):
		config.connectivity.usb_mode = !config.connectivity.usb_mode;
		eeprom_busy_wait();
		eeprom_update_byte(&config_ee.connectivity.usb_mode, config.connectivity.usb_mode);
	break;

	case(1):
		config.connectivity.uart_function = (config.connectivity.uart_function + 1) % NUMBER_OF_UART_FORWARD;
		eeprom_busy_wait();
		eeprom_update_byte(&config_ee.connectivity.uart_function, config.connectivity.uart_function);
		uart_stop();
		uart_init();
	break;

	case(2):
		if (!storage_card_in())
		{
			gui_showmessage_P(PSTR("No SD card!"));

			return;
		}
		gui_dialog_set_P(PSTR("Warning"), PSTR("This will erase\nall data from SD\ncard! Continue?"), GUI_STYLE_YESNO, gui_set_advanced_format_cb);
		gui_switch_task(GUI_DIALOG);
	break;

	case(3):
		gui_switch_task(GUI_SET_CALIB);
	break;
	}
}
开发者ID:DD1984,项目名称:skydrop_stm32,代码行数:34,代码来源:set_advanced.cpp


示例6: gui_set_autostart_action

void gui_set_autostart_action(uint8_t index)
{
	switch(index)
	{
		case(1):
			gui_value_conf_P(PSTR("Start threshold"), GUI_VAL_NUMBER_DISABLE, PSTR("+/-%0.0fm"), config.autostart.start_sensititvity, 0, 100, 1, gui_set_autostart_start_threshold_cb);
			gui_switch_task(GUI_SET_VAL);
		break;

		case(2):
			gui_value_conf_P(PSTR("Land threshold"), GUI_VAL_NUMBER_DISABLE, PSTR("+/-%0.0fm"), config.autostart.land_sensititvity, 0, 100, 1, gui_set_autostart_land_threshold_cb);
			gui_switch_task(GUI_SET_VAL);
		break;

		case(3):
			gui_value_conf_P(PSTR("Timeout"), GUI_VAL_NUMBER, PSTR("%0.0f sec"), config.autostart.timeout, 5, 240, 1, gui_set_autostart_timeout_cb);
			gui_switch_task(GUI_SET_VAL);
		break;

		case(4):
			config.autostart.flags ^= AUTOSTART_SUPRESS_AUDIO;
			eeprom_busy_wait();
			eeprom_update_byte(&config_ee.autostart.flags, config.autostart.flags);
		break;

		case(5):
			config.autostart.flags ^= AUTOSTART_ALWAYS_ENABLED;
			eeprom_busy_wait();
			eeprom_update_byte(&config_ee.autostart.flags, config.autostart.flags);
		break;
	}
}
开发者ID:EATtomatoes,项目名称:SkyDrop,代码行数:32,代码来源:set_autostart.cpp


示例7: SetUpNewEEPROM

void SetUpNewEEPROM() {
  eeprom_update_block(sig, (void*)(EEPROM_SIG_START), EEPROM_SIG_LENGTH);
  eeprom_update_byte((uint8_t*)EEPROM_VERSION_START, DEVICE_VERSION_MAJOR);
  eeprom_update_byte((uint8_t*)EEPROM_VERSION_START + 1,
                     DEVICE_VERSION_MINOR);
  eeprom_update_block((const void*)&webUsbDescriptorStringSerialNumber[1],
                      (void*)EEPROM_SERIAL_START, EEPROM_SERIAL_LENGTH);
}
开发者ID:sowbug,项目名称:weblight,代码行数:8,代码来源:eeprom.c


示例8: eeprom_update_byte

void HalRgbLed::saveTorch(short red, short green, short blue) {
  eeprom_update_byte((uint8_t *)8127, red);
  eeprom_update_byte((uint8_t *)8128, green);
  eeprom_update_byte((uint8_t *)8129, blue);

  torchRedValue = red;
  torchGreenValue = green;
  torchBlueValue = blue;
}
开发者ID:carledwards,项目名称:library-pinoccio,代码行数:9,代码来源:halRgbLed.cpp


示例9: reset

void reset ()
{
	eeprom_update_byte (ADC_BATTERY_EEPROM_CURRENT_SENSOR, ADC_BATTERY_DEFAULT_CURRENT_SENSOR);
	eeprom_update_float (ADC_BATTERY_EEPROM_VOLTAGE_MULTIPLIER, ADC_BATTERY_DEFAULT_VOLTAGE_MULTIPLIER);
	eeprom_update_float (ADC_BATTERY_EEPROM_CURRENT_MULTIPLIER, ADC_BATTERY_DEFAULT_CURRENT_MULTIPLIER);
	eeprom_update_word (ADC_BATTERY_EEPROM_UPDATE_INTERVAL, ADC_BATTERY_DEFAULT_UPDATE_INTERVAL);
	eeprom_update_byte (ADC_BATTERY_EEPROM_VOLTAGE_CHANNEL, ADC_BATTERY_DEFAULT_VOLTAGE_CHANNEL);
	eeprom_update_byte (ADC_BATTERY_EEPROM_CURRENT_CHANNEL, ADC_BATTERY_DEFAULT_CURRENT_CHANNEL);
}
开发者ID:gitter-badger,项目名称:min_raw_osd,代码行数:9,代码来源:adc_battery.cpp


示例10: reset

	void reset ()
	{
		eeprom_update_byte (OSD_EEPROM_SWITCH, OSD_EEPROM_SWITCH_DEFAULT);
		eeprom_update_byte (OSD_EEPROM_SWITCH_RAW_CHANNEL, OSD_EEPROM_SWITCH_RAW_CHANNEL_DEFAULT);
		eeprom_update_byte (OSD_EEPROM_SCREENS, OSD_MAX_SCREENS);
		eeprom_update_word (OSD_EEPROM_CHANNEL_MIN, OSD_CHANNEL_MIN);
		eeprom_update_word (OSD_EEPROM_CHANNEL_MAX, OSD_CHANNEL_MAX);
		screen::settings::reset ();
	}
开发者ID:siggioli,项目名称:MultiOSD,代码行数:9,代码来源:osd.cpp


示例11: increase_day_count_eeprom

//some more initialization of EEPROM
void increase_day_count_eeprom(){
	curr_day = eeprom_read_byte (& NonVolatileDayCount);
	curr_day++;
	if(curr_day>5){
		curr_day = 1;
	}
	if(write_enable_update_date_count_eeprom){
		eeprom_update_byte ((uint8_t*) (&NonVolatileDayCount), curr_day);
	}
	for(int i=0;i<MAX_PEOPLE;i++){
		eeprom_update_byte ((uint8_t*) (&NonVolatileIsPresent[curr_day][i]), 0);
	}
}
开发者ID:amatur,项目名称:RFID-Classroom-Monitoring,代码行数:14,代码来源:main.c


示例12: enter_bootloader

void
enter_bootloader(uint8_t nad, uint8_t function)
{
    // make sure the watchdog doesn't catch us while we're updating the EEPROM
    wdt_reset();

    // write magic to the EEPROM to cause us to wait in the bootloader
    eeprom_update_byte((uint8_t *)kConfigNodeAddress, nad);
    eeprom_update_byte((uint8_t *)kConfigFunction, function);
    eeprom_update_word((uint16_t *)kConfigMagic, kBLMagic); // operation_magic::kEnterBootloader

    reset();
}
开发者ID:John-Titor,项目名称:LIN_Nodes,代码行数:13,代码来源:board.cpp


示例13: Qtwo__init

void Qtwo__init (void)
{
	if (eeprom_read_byte(&modeAutoColor_EEPROM) == TRUE)
	{
		modeAutoColor = TRUE;
	}
	else
	{
		/* automatic color change */
		modeAutoColor = FALSE;
		eeprom_update_byte(&modeAutoColor_EEPROM, modeAutoColor);
	}

	if (eeprom_read_byte(&currentColor_EEPROM) < QTWO_COLOR_NB)
	{
		currentColor = eeprom_read_byte(&currentColor_EEPROM);
	}
	else
	{
		currentColor = 0;
		eeprom_update_byte(&currentColor_EEPROM, currentColor);
	}

	/* brightness level */
	if ((eeprom_read_byte(&currentBrightnessSetting_EEPROM)) == QTWO_BRIGHTNESS_HIGH)
	{
		currentBrightnessSetting = QTWO_BRIGHTNESS_HIGH;
		currentBrightnessTable = brightnessLevels_high;
	}
	else
	{
		currentBrightnessSetting = QTWO_BRIGHTNESS_LOW;
		currentBrightnessTable = brightnessLevels;
		eeprom_update_byte(&currentBrightnessSetting_EEPROM, currentBrightnessSetting);
	}


	if ((eeprom_read_byte(&selectedLang_EEPROM)) < QTWO_LANG_NB)
	{
		selectedLang = eeprom_read_byte(&selectedLang_EEPROM);
	}
	else
	{
		selectedLang = QTWO_LANG_DE_SUED;
		eeprom_update_byte(&selectedLang_EEPROM, selectedLang);
	}

	/* other states initialized in Qtwo__modeTransition() */
}
开发者ID:JMGgit,项目名称:ATMega_Projects__JMG,代码行数:49,代码来源:Mode_Qtwo.c


示例14: write_byte

static void write_byte(cfg_addr_t pos, uint8_t b) {
	DBG_C(' ');
	DBG_X(pos);
	DBG_C('=');
	DBG_X(b);
	eeprom_update_byte((uint8_t *)EEPROM_POS + pos, b);
}
开发者ID:InfernoEmbedded,项目名称:owslave,代码行数:7,代码来源:dev_data.c


示例15: gui_page_power_off

void gui_page_power_off()
{
	gui_splash_set_mode(SPLASH_OFF);
	gui_switch_task(GUI_SPLASH);
	eeprom_busy_wait();
	eeprom_update_byte(&config.gui.last_page, active_page);
}
开发者ID:leachim1,项目名称:SkyDrop,代码行数:7,代码来源:pages.cpp


示例16: gui_set_display_brightness_timeout_cb

void gui_set_display_brightness_timeout_cb(float val)
{
	gui_switch_task(GUI_SET_DISPLAY);
	eeprom_busy_wait();
	lcd_brightness_timeout = val;
	eeprom_update_byte(&config.gui.brightness_timeout, lcd_brightness_timeout);
}
开发者ID:leachim1,项目名称:SkyDrop,代码行数:7,代码来源:set_display.cpp


示例17: keymap_keycode_save

void keymap_keycode_save(uint8_t layer, uint8_t row, uint8_t column, uint16_t keycode)
{
	void *address = keymap_key_to_eeprom_address(layer, row, column);
	// Big endian, so we can read/write EEPROM directly from host if we want
	eeprom_update_byte(address, (uint8_t)(keycode >> 8));
	eeprom_update_byte(address+1, (uint8_t)(keycode & 0xFF));
}
开发者ID:nelseric,项目名称:qmk_firmware,代码行数:7,代码来源:zeal_keymap.c


示例18: putValue

void putValue(void* aAdr, uint8_t aPType, int32_t* aValue)
{
    union {
        void*     adr; 
        uint8_t*  u8Adr;
        uint16_t* u16Adr;
        //        uint32_t* u32Adr;
    } a;

    a.adr = aAdr;
    if (ISEEADR(aPType))
    {
        if (IS8BIT(aPType))
            eeprom_update_byte(aAdr, ISSIGNED(aPType) ? (int8_t) *aValue : (uint8_t) *aValue);
        else if(IS16BIT(aPType))
            eeprom_update_word(aAdr, ISSIGNED(aPType) ? (int16_t) *aValue : (uint16_t) *aValue);
#ifdef WITH_EE32VALUES
        else if(IS32BIT(aPType))
            eeprom_update_dword(aAdr, ISSIGNED(aPType) ? *aValue : (uint32_t) *aValue);
#endif
    } else if (ISRAMADR(aPType))
    {
        if (IS8BIT(aPType))
            *a.u8Adr = ISSIGNED(aPType) ? (int8_t) *aValue : (uint8_t) *aValue;
        else if(IS16BIT(aPType))
            *a.u16Adr = ISSIGNED(aPType) ? (int16_t) *aValue : (uint32_t) *aValue;
#ifdef WITH_EE32VALUES
        else if(IS32BIT(aPType))
            *a.u32Adr = ISSIGNED(aPType) ?  *aValue : (uint32_t) *aValue;
#endif
    }
    feedback(1, BLINK_MEDIUM, WITH_LED1);
} // getValue
开发者ID:Zimatcher-,项目名称:emx-kk2,代码行数:33,代码来源:PutValue.c


示例19: hadUsbReset

void hadUsbReset(void)
{
    cli(); // usbMeasureFrameLength() counts CPU cycles, so disable interrupts.
    calibrateOscillator();
    sei();
    eeprom_update_byte(&eeCalibrationMemory, OSCCAL);   /* store the calibrated value in EEPROM */
}
开发者ID:johannes85,项目名称:bloenk-hardware,代码行数:7,代码来源:main.c


示例20: main

int main(void) {

  initUSART();
  char ramString[STRING_LEN];
  uint8_t counter;

  while (1) {
    printString("\r\n------------------\r\n");
    eeprom_read_block(ramString, eepromString, STRING_LEN);
    printString(ramString);

    printString("\r\nThe counter reads: ");
    counter = eeprom_read_byte(&eepromCounter);
    printByte(counter);

    printString("\r\nMy uint16_t value is: ");
    printWord(eeprom_read_word(&eepromWord));

    printString("\r\n   Enter a new introduction string below:\r\n");
    readString(ramString, STRING_LEN);
    eeprom_update_block(ramString, eepromString, STRING_LEN);
    counter++;
    eeprom_update_byte(&eepromCounter, counter);
  }
  return (0);
}
开发者ID:000dragon000,项目名称:AVR-Programming,代码行数:26,代码来源:eememDemo.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ eeprom_write函数代码示例发布时间:2022-05-30
下一篇:
C++ eeprom_read_word函数代码示例发布时间: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