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

C++ eeprom_busy_wait函数代码示例

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

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



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

示例1: constrain

Waypoints::WP
Waypoints::get_waypoint_with_index(uint8_t i)
{
	Waypoints::WP wp;

	i = constrain(i, 0, _total);
	uint32_t mem = _start_byte + (i * _wp_size);
	
	eeprom_busy_wait();
	wp.id = eeprom_read_byte((uint8_t *)mem);

	mem++;
	eeprom_busy_wait();
	wp.p1 = eeprom_read_byte((uint8_t *)mem);

	mem++;
	eeprom_busy_wait();
	wp.alt = (long)eeprom_read_dword((uint32_t *)mem);

	mem += 4;
	eeprom_busy_wait();
	wp.lat = (long)eeprom_read_dword((uint32_t *)mem);

	mem += 4;
	eeprom_busy_wait();
	wp.lng = (long)eeprom_read_dword((uint32_t *)mem);
}
开发者ID:AhLeeYong,项目名称:x-drone,代码行数:27,代码来源:Waypoints.cpp


示例2: 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


示例3: command_wol

//------------------------------------------------------------------------------
//
void command_wol (void)
{
#if USE_WOL
    // EEPROM beschreiben, falls Parameter angegeben wurden
    if ((*((unsigned int*)&variable[0]) != 0x00000000) || (*((unsigned int*)&variable[1]) != 0x00000000) || (*((unsigned int*)&variable[2]) != 0x00000000))
    {
        //schreiben der MAC
        for (unsigned char count = 0; count<6; count++)
        {
            eeprom_busy_wait ();
            eeprom_write_byte((unsigned char *)(WOL_MAC_EEPROM_STORE + count),variable[count]);
        }
        //zusätzlich schreiben der Broadcast-Adresse, falls vorhandenden
        for (unsigned char count = 0; count<4 && (*((unsigned int*)&variable[6]) != 0x00000000); count++)
        {
            eeprom_busy_wait ();
            eeprom_write_byte((unsigned char*)(WOL_BCAST_EEPROM_STORE + count),variable[count+6]);
        }
        //init
        wol_init();
    } else {
        //MagicPacket senden
        wol_request();
    }
#endif //USE_WOL	
}
开发者ID:icke2063,项目名称:AVRNETIO_MAIN,代码行数:28,代码来源:cmd_mini.c


示例4: 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


示例5: calibrate

void calibrate(void)
{
  uint16_t min, max;
  // Timer/Counter0,1 Overflow Interrupt Enable - LED1 blinking
  TIMSK |= _BV(TOIE1);

  // Calibrate minimum value
  PORTA &= ~_BV(LED2);
  wait_for_prog();
  min = pressure();
  PORTA |= _BV(LED2);

  // Calibrate maximum value
  PORTA &= ~_BV(LED3);
  wait_for_prog();
  max = pressure();
  PORTA |= _BV(LED3) | _BV(LED1);

  // Save values in EEPROM
  eeprom_busy_wait();
  eeprom_write_word(PMINIMUM, min);

  eeprom_busy_wait();
  eeprom_write_word(PMAXIMUM, max);

  // Timer/Counter0,1 Overflow Interrupt Disable
  TIMSK &= ~_BV(TOIE1);
}
开发者ID:qoobaa,项目名称:depthsensor-code,代码行数:28,代码来源:sensor.c


示例6: logger_next_flight

void logger_next_flight()
{
	uint8_t sec, min, hour, day, wday, month;
	uint16_t year;
	uint32_t today;


	datetime_from_epoch(time_get_local(), &sec, &min, &hour, &day, &wday, &month, &year);
	today = datetime_to_epoch(0, 0, 0, day, month, year);
	
	if (today == logger_flight_day)
	{
		logger_flight_number++;

		eeprom_busy_wait();
		eeprom_update_byte(&config_ro.flight_number, logger_flight_number);
	}
	else
	{
		logger_flight_number = 0;
		logger_flight_day = today;

		eeprom_busy_wait();
		eeprom_update_block((void *)&logger_flight_day, &config_ro.flight_date, sizeof(logger_flight_day));
		eeprom_update_byte(&config_ro.flight_number, logger_flight_number);
	}

	DEBUG("date is: ");
	print_datetime(today);
	DEBUG("flight number is: %d\n", logger_flight_number);
}
开发者ID:Flyingplanet,项目名称:SkyDrop,代码行数:31,代码来源:logger.cpp


示例7: logger_init

void logger_init()
{
	log_fil = new FIL;
	fc.logger_state = LOGGER_IDLE;

	uint8_t sec, min, hour, day, wday, month;
	uint16_t year;
	uint32_t today;


	datetime_from_epoch(time_get_local(), &sec, &min, &hour, &day, &wday, &month, &year);
	today = datetime_to_epoch(0, 0, 0, day, month, year);

	eeprom_busy_wait();
	eeprom_read_block((void *)&logger_flight_day, &config_ro.flight_date, sizeof(logger_flight_day));
	logger_flight_number = eeprom_read_byte(&config_ro.flight_number);

	if (logger_flight_day != today)
	{
		logger_flight_number = 0;
		logger_flight_day = today;

		eeprom_busy_wait();
		eeprom_update_block((void *)&logger_flight_day, &config_ro.flight_date, sizeof(logger_flight_day));
		eeprom_update_byte(&config_ro.flight_number, logger_flight_number);
	}

	DEBUG("date is: ");
	print_datetime(today);
	DEBUG("flight number is: %d\n", logger_flight_number);

}
开发者ID:Flyingplanet,项目名称:SkyDrop,代码行数:32,代码来源:logger.cpp


示例8: PROFILING

void PLEN2::JointController::resetSettings()
{
    #if DEBUG
        PROFILING("JointController::resetSettings()");
    #endif


    EEPROM[INIT_FLAG_ADDRESS] = INIT_FLAG_VALUE;
    eeprom_busy_wait();

    for (uint8_t index = 0; index < sizeof(Shared::m_SETTINGS_INITIAL); index++)
    {
        EEPROM[SETTINGS_HEAD_ADDRESS + index] = pgm_read_byte(
            reinterpret_cast<const uint8_t*>(Shared::m_SETTINGS_INITIAL) + index
        );
        eeprom_busy_wait();
    }

    for (uint8_t joint_id = 0; joint_id < JOINTS_SUM; joint_id++)
    {
        m_SETTINGS[joint_id].MIN  = pgm_read_word(Shared::m_SETTINGS_INITIAL + joint_id * 3 + 0);
        m_SETTINGS[joint_id].MAX  = pgm_read_word(Shared::m_SETTINGS_INITIAL + joint_id * 3 + 1);
        m_SETTINGS[joint_id].HOME = pgm_read_word(Shared::m_SETTINGS_INITIAL + joint_id * 3 + 2);

        setAngle(joint_id, m_SETTINGS[joint_id].HOME);
    }
}
开发者ID:PingguSoft,项目名称:PLEN2,代码行数:27,代码来源:JointController.cpp


示例9: cfg_load

void cfg_load()
{
  eeprom_busy_wait();

  /* check for magic number */
  uint8_t magic = eeprom_read_byte((const uint8_t *)EEPROM_MAGIC_ADDR);
  if (magic != EEPROM_MAGIC)
  {
    /* no data previously stored; set defaults and save */
    cfg_set_defaults();
    cfg_save();
  }
  else
  {
    /* data previously stored; read it */
    eeprom_busy_wait();
    eeprom_read_block(profile1,(const void *)EEPROM_PROF1_ADDR,TC_NUM_PARAMS);
    eeprom_busy_wait();
    eeprom_read_block(profile2,(const void *)EEPROM_PROF2_ADDR,TC_NUM_PARAMS);

    /* sanity check */
    uint8_t i;
    for (i = 0; i < TC_NUM_PARAMS; i++)
    {
      /* if the value is corrupt, restore the default */
      uint8_t maxval = pgm_read_byte(&(params[i]->numvals));
      if (profile1[i] >= maxval)
        profile1[i] = pgm_read_byte(&(params[i]->defaultval));
      if (profile2[i] >= maxval)
        profile2[i] = pgm_read_byte(&(params[i]->defaultval));
    }
  }
}
开发者ID:74hc595,项目名称:Terminalscope,代码行数:33,代码来源:termconfig.c


示例10: 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


示例11: 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;

    case(5):
        gui_switch_task(GUI_SET_AUTOSET);
    break;
	}
}
开发者ID:fhorinek,项目名称:SkyDrop,代码行数:34,代码来源:layouts.cpp


示例12: 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:pculka,项目名称:SkyDrop,代码行数:28,代码来源:set_bluetooth.cpp


示例13: p

void PLEN2::JointController::resetSettings()
{
	#if DEBUG
		volatile Utility::Profiler p(F("JointController::resetSettings()"));
	#endif

	EEPROM[INIT_FLAG_ADDRESS()] = INIT_FLAG_VALUE();
	eeprom_busy_wait();

	for (int index = 0; index < sizeof(Shared::m_SETTINGS_INITIAL); index++)
	{
		EEPROM[SETTINGS_HEAD_ADDRESS() + index] = pgm_read_byte(
			reinterpret_cast<const char*>(Shared::m_SETTINGS_INITIAL) + index
		);
		eeprom_busy_wait();
	}

	for (char joint_id = 0; joint_id < SUM; joint_id++)
	{
		m_SETTINGS[joint_id].MIN  = pgm_read_word(Shared::m_SETTINGS_INITIAL + joint_id * 3 + 0);
		m_SETTINGS[joint_id].MAX  = pgm_read_word(Shared::m_SETTINGS_INITIAL + joint_id * 3 + 1);
		m_SETTINGS[joint_id].HOME = pgm_read_word(Shared::m_SETTINGS_INITIAL + joint_id * 3 + 2);

		setAngle(joint_id, m_SETTINGS[joint_id].HOME);
	}
}
开发者ID:Temigo,项目名称:plen-Firmware_Arduino,代码行数:26,代码来源:JointController.cpp


示例14: clear_events

void clear_events()
{
	events_count = 0;
	
	// clear all data
	for (int i = 0; i < EVENTS_SIZE; i++)
	{
		events[i].pin = -1;
		events[i].time = 0;
		events[i].pin_state = 0;
		events[i].inc = 0;
		events[i].duration = 0;
		events[i].type = 0;
		
	}
	
	// save event to eeprom
	eeprom_busy_wait();
	eeprom_write_block(&events, &events_ee, sizeof(struct Event) * EVENTS_SIZE);
	
	// save count
	eeprom_busy_wait();
	eeprom_write_byte(&events_count_ee, events_count);
	
	event_mode = MANUAL_MODE;
}
开发者ID:snegtec,项目名称:MeropiModerariModuli,代码行数:26,代码来源:events.c


示例15: add_event

void add_event(int pin, int32_t time, int pin_state)
{
	// don't add if no space
	if (events_count >= EVENTS_SIZE - 1)
	return;
	
	events[events_count].pin = pin;
	events[events_count].time = time;
	events[events_count].pin_state = pin_state;
	
	if (pin_state > 1)
	events[events_count].type = PWM;
	else
	events[events_count].type = EXP;
	
	events_count++;
	
	// save event to eeprom
	eeprom_busy_wait();
	eeprom_write_block(&events, &events_ee, sizeof(struct Event) * EVENTS_SIZE);
	
	// save count
	eeprom_busy_wait();
	eeprom_write_byte(&events_count_ee, events_count);
}
开发者ID:snegtec,项目名称:MeropiModerariModuli,代码行数:25,代码来源:events.c


示例16: write32int

void  write32int (int inode, int offset, int32_t value)
{
    
    uint16_t addr;
  	
  	uint16_t value1;
  	
  	uint32_t value2;
  	
  	value1 = (uint16_t)((*(uint32_t *)&value) >> 16);
  	
  	value2 = (uint16_t)((*(uint32_t *)&value) & 0x0000ffff);
  	
  	addr = inode*INODESIZE + offset;
  	
  	eeprom_busy_wait();
  	
  	//value2 = *(uint16_t *)&value;
  	
  	eeprom_write_word((uint16_t *)addr, value2);
  	
  	
  	addr = inode*INODESIZE + offset +2 ;
  	
  	eeprom_busy_wait();
  	
  	//value2 = *(uint16_t *)&value;
  	
  	eeprom_write_word((uint16_t *)addr, value1);
   	
  	return;    		

}
开发者ID:beartan,项目名称:liteOS,代码行数:33,代码来源:io_eeprom.c


示例17: PROFILING

void PLEN2::JointController::loadSettings()
{
    #if DEBUG
        PROFILING("JointController::loadSettings()");
    #endif


    uint8_t* filler = reinterpret_cast<uint8_t*>(m_SETTINGS);
    
    if (EEPROM[INIT_FLAG_ADDRESS] != INIT_FLAG_VALUE)
    {
        EEPROM[INIT_FLAG_ADDRESS] = INIT_FLAG_VALUE;
        eeprom_busy_wait();

        for (uint8_t index = 0; index < sizeof(m_SETTINGS); index++)
        {
            EEPROM[SETTINGS_HEAD_ADDRESS + index] = filler[index];
            eeprom_busy_wait();
        }
    }
    else
    {
        for (uint8_t index = 0; index < sizeof(m_SETTINGS); index++)
        {
            filler[index] = EEPROM[SETTINGS_HEAD_ADDRESS + index];
        }
    }

    for (uint8_t joint_id = 0; joint_id < JOINTS_SUM; joint_id++)
    {
        setAngle(joint_id, m_SETTINGS[joint_id].HOME);
    }

    /*
        @brief Configure timer 1

        @attention
        It might be easy to understand compare-matched output is LOW,
        but in that case, PWM is outputting at switching multiplexer's output,
        so the signal gets an impulse noise.
    */
    cli();

    TCCR1A =
        _BV(WGM11)  | _BV(WGM10)  | // Set mode to "10bit fast PWM".
        _BV(COM1A1) | _BV(COM1A0) | // Set OC1A to HIGH when compare matched.
        _BV(COM1B1) | _BV(COM1B0) | // Set OC1B to HIGH when compare matched.
        _BV(COM1C1) | _BV(COM1C0);  // Set OC1C to HIGH when compare matched.

    TCCR1B = 
        _BV(WGM12) |                // Set mode to "10bit fast PWM".
        _BV(CS11)  | _BV(CS10);     // Set prescaler to 64.

    TIFR1 = _BV(OCF1A) | _BV(OCF1B) | _BV(OCF1C) | _BV(TOV1); // Clearing interruption flag.

    sei();

    TIMSK1 = _BV(TOIE1); // Begin timer 1.
}
开发者ID:plenprojectcompany,项目名称:PLEN2,代码行数:59,代码来源:JointController.cpp


示例18: udp_cmd_get

//----------------------------------------------------------------------------
//Empfang der IP
void udp_cmd_get (unsigned char index)
{
	//UDP_CMD_DEBUG("** CMD DATA GET Bytes: %i **\r\n",((UDP_DATA_END_VAR)-(UDP_DATA_START)));

	struct IP_Header *ip;
	ip = (struct IP_Header *)&eth_buffer[IP_OFFSET];
	udp_cmd_pollReplyTarget = ip->IP_Srcaddr;
	
	if(strcasestr_P((char*)&eth_buffer[UDP_DATA_START],PSTR("CMD IP ")) != 0){	
		if ((eth_buffer[UDP_DATA_START+11] == myip[0] &&
			eth_buffer[UDP_DATA_START+12] == myip[1] &&
			eth_buffer[UDP_DATA_START+13] == myip[2] &&
			eth_buffer[UDP_DATA_START+14] == myip[3])||
			(eth_buffer[UDP_DATA_START+11] == 255 &&
			eth_buffer[UDP_DATA_START+12] == 255 &&
			eth_buffer[UDP_DATA_START+13] == 255 &&
			eth_buffer[UDP_DATA_START+14] == 255))
		{
			//write default port
			unsigned short tmp = 0x1936;
			eeprom_write_block(&tmp,(void *)64, 2);

			//write_eeprom_ip(IP_EEPROM_STORE);
			if (*((unsigned int*)&eth_buffer[UDP_DATA_START+7]) != 0x00000000)
			{	
				//value ins EEPROM schreiben
				for (unsigned char count = 0; count<4;count++)
				{
					eeprom_busy_wait ();
					eeprom_write_byte((unsigned char *)(IP_EEPROM_STORE + count),eth_buffer[UDP_DATA_START+7+count]);
				}
			}

			//write_eeprom_netmask(NETMASK_EEPROM_STORE);
			if (*((unsigned int*)&eth_buffer[UDP_DATA_START+15]) != 0x00000000)
			{	
				//value ins EEPROM schreiben
				for (unsigned char count = 0; count<4;count++)
				{
					eeprom_busy_wait ();
					eeprom_write_byte((unsigned char *)(NETMASK_EEPROM_STORE + count),eth_buffer[UDP_DATA_START+15+count]);
				}
			}
			
			(*((unsigned long*)&myip[0])) = MYIP;
			(*((unsigned long*)&netmask[0])) = NETMASK;

			//UDP_CMD_DEBUG("My IP: %1i.%1i.%1i.%1i\r\n",myip[0],myip[1],myip[2],myip[3]);
			//UDP_CMD_DEBUG("MASK %1i.%1i.%1i.%1i\r\n", netmask[0]  , netmask[1]  , netmask[2]  , netmask[3]);
			
			//send OK
			eth_buffer[UDP_DATA_START] = 'O';
			eth_buffer[UDP_DATA_START+1] = 'K';
			//create_new_udp_packet(2,UDP_CMD_PORT_TX+1392,UDP_CMD_PORT_TX,udp_cmd_pollReplyTarget);
			create_new_udp_packet(2,UDP_CMD_PORT_TX+3456,UDP_CMD_PORT_TX,(unsigned long)0xffffffff);
		}
	}
}
开发者ID:petershaw,项目名称:dirarare-artnet-server,代码行数:60,代码来源:udp_cmd.c


示例19: eeprom_del_rule

uint8_t eeprom_del_rule (uint8_t pos)
{
/*  del_rule
*   
*/  
  uint8_t count,i;
  uint16_t target_adress;
  RULES_STRUCTUR hilf;
  
  RULE_DEBUG("Del Rule:%i\r\n",pos);
  
  
  //aktuelle Anzahl auslesen
	count = get_rule_count();
  

  if(pos>=0 && pos<=count)
  {
    //folgende Regeln nachr�ckenen lassen
    for(i=pos;i<count;i++)
    {
      
      if(eeprom_get_rule(i+1,&hilf))
      {
          
        // Zieladresse berechnen
        target_adress=RULES_EEPROM_STORE+1+(i*sizeof(RULES_STRUCTUR));
        RULE_DEBUG("EEPROM write adress:%i\r\n",target_adress);
    
  
        // Regel in den EEPROM schreiben
        eeprom_busy_wait ();
        eeprom_write_block((unsigned char *)&hilf,(unsigned char *)target_adress,sizeof(RULES_STRUCTUR));
      }
      else
      {
        return 0;
      }
      
  
    }
  
    //bisher alles OK -> neuen Wert ins EEPROM schreiben
		eeprom_busy_wait ();
		eeprom_write_byte((unsigned char *)(RULES_EEPROM_STORE),--count);
  
    return 1;
  }
  else
  {
    RULE_DEBUG("Failure: Out of Range\r\n");
    return 0;
  }
  
return 0;
  
}
开发者ID:icke2063,项目名称:AVRNETIO_MAIN,代码行数:57,代码来源:rules.c


示例20: cfg_save

void cfg_save()
{
  eeprom_busy_wait();
  eeprom_write_byte((uint8_t *)EEPROM_MAGIC_ADDR, EEPROM_MAGIC);
  eeprom_busy_wait();
  eeprom_write_block(profile1, (void *)EEPROM_PROF1_ADDR, TC_NUM_PARAMS);
  eeprom_busy_wait();
  eeprom_write_block(profile2, (void *)EEPROM_PROF2_ADDR, TC_NUM_PARAMS);
}
开发者ID:74hc595,项目名称:Terminalscope,代码行数:9,代码来源:termconfig.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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