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

C++ RESET函数代码示例

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

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



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

示例1: mcp2515_bit_modify

// -------------------------------------------------------------------------
void mcp2515_bit_modify(uint8_t adress, uint8_t mask, uint8_t data)
{
	RESET(MCP2515_CS);
	
	spi_putc(SPI_BIT_MODIFY);
	spi_putc(adress);
	spi_putc(mask);
	spi_putc(data);
	
	SET(MCP2515_CS);
}
开发者ID:gilgad2000,项目名称:ArduinoCode,代码行数:12,代码来源:mcp2515.c


示例2: sja1000_read

uint8_t sja1000_read(uint8_t address)
{
	uint8_t data;

	// set address
	SET(SJA1000_ALE);
	PORT(SJA1000_DATA) = address;
	_NOP();
	RESET(SJA1000_ALE);
	DDR(SJA1000_DATA) = 0;

	// read data
	RESET(SJA1000_RD);
	_NOP();
	data = PIN(SJA1000_DATA);
	SET(SJA1000_RD);
	DDR(SJA1000_DATA) = 0xff;

	return data;
}
开发者ID:toonst,项目名称:RCA-can-lib,代码行数:20,代码来源:sja1000.c


示例3: SystemException

Processor::Processor()
{
	REGISTERS = gcnew array<BYTE>(7);
	memory = gcnew array<BYTE>(65536);

	if(!REGISTERS || !memory) {
		throw gcnew SystemException("Cannot allocate memory on heap.");
	}

	RESET();
}
开发者ID:banga,项目名称:Emulator,代码行数:11,代码来源:Processor.cpp


示例4: checksum

/* check the checksum */
void 
checksum(void)
{
	g2x();
	if(cksum!=0)	// if checksum does not add to zero, bad check, reset
		RESET();
#if VERBOSE == 2
	putch('\r');	// echo each hex record on a new line
	putch('\n');	// echo each hex record on a new line
#endif
}
开发者ID:wheelerz,项目名称:ento,代码行数:12,代码来源:bootldr.c


示例5: new

void UT_TMceStartingAnswererStreams::SetupL()
    {
	CMccControllerStub::OpenL();
    iMcc = CMccControllerStub::Stub();
    iServer = new (ELeave) CMceServerStub();
    iManager = CMceMediaManager::NewL( *iServer );
    iSdpDocument = CSdpDocument::DecodeL( KMceMMTestSdpAnswerAudioIMS5PrecsSendrecv );
    
    iSession = MceMediaManagerTestHelper::CreateAudioOutSessionL();
    SETUP();
    RESET();
    } 
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:12,代码来源:UT_TMCEStartingAnswererStreams.cpp


示例6: terminal_operation

void terminal_operation(ringbuf_t *tx, char *op0, char *op1, char *op2, char *op3) {
    if (!strcmp(op0, "help") || !strcmp(op0, "?")) {
        ringbuf_put_str(tx,
                "\tprint_time(t)\n"
                "\tadjust_time(at) [hand:y,M,d,h,m,s] [value(decimal)]\n"
                "\tpwm [color:R,G,B,W] [value(%):0~100]\n"
                "\tpwm clear\n"
                "\tset time_sync_mode(sync)\n"
                "\tset ADC_mode(adc)\n"
                "\tRESET();\n"
                );
    }
    terminal_time(tx, op0, op1, op2);
    if (!strcmp(op0, "RESET();")) {
        RESET();
    }
    if (!strcmp(op0, "bootload")) {
        asm("goto   0x001C");
    }
    if (!strcmp(op0, "set")) {
        if (!strcmp(op1, "sync")) {
            light_mode = TIME_SYNC_mode;
        }
        if (!strcmp(op1, "adc") || !strcmp(op1, "ADC")) {
            light_mode = ADC_mode;
        }
    }
    if (!strcmp(op0, "pwm") || !strcmp(op0, "PWM")) {
        if (!strcmp(op1, "r") || !strcmp(op1, "R")) {
            light_mode = COMMAND_mode;
            PWM_set(0, atoi(op2) * PR_VALUE / 100);
        }
        if (!strcmp(op1, "g") || !strcmp(op1, "G")) {
            light_mode = COMMAND_mode;
            PWM_set(1, atoi(op2) * PR_VALUE / 100);
        }
        if (!strcmp(op1, "b") || !strcmp(op1, "B")) {
            light_mode = COMMAND_mode;
            PWM_set(2, atoi(op2) * PR_VALUE / 100);
        }
        if (!strcmp(op1, "w") || !strcmp(op1, "W")) {
            light_mode = COMMAND_mode;
            PWM_set(3, atoi(op2) * PR_VALUE / 100);
        }
        if (!strcmp(op1, "clear")) {
            light_mode = COMMAND_mode;
            PWM_set(0, 0);
            PWM_set(1, 0);
            PWM_set(2, 0);
            PWM_set(3, 0);
        }
    }
}
开发者ID:kerikun11,项目名称:MPLABXProjects,代码行数:53,代码来源:PIC18F27J53-killifish_light06.c


示例7: mcp2515_init

void mcp2515_init(void)
{
	// Aktivieren der Pins fuer das SPI Interface
	PORT_SPI &=  ~((1 << PIN_NUM(P_SCK)) | (1 << PIN_NUM(P_MOSI)));
	DDR_SPI |= (1 << PIN_NUM(P_SCK)) | (1 << PIN_NUM(P_MOSI));
	
	SET(MCP2515_CS);
	SET_OUTPUT(MCP2515_CS);
	
	// Aktivieren des SPI Master Interfaces
	SPCR = (1 << SPE) | (1 << MSTR) | R_SPCR;
	SPSR = R_SPSR;
	
	_delay_us(1);
	
	// MCP2515 per Software Reset zuruecksetzten,
	// danach ist er automatisch im Konfigurations Modus
	RESET(MCP2515_CS);
	spi_putc(SPI_RESET);
	SET(MCP2515_CS);
	
	// ein bisschen warten bis der MCP2515 sich neu gestartet hat
	_delay_ms(0.1);
	
	// Filter usw. setzen
	RESET(MCP2515_CS);
	spi_putc(SPI_WRITE);
	spi_putc(RXF0SIDH);
	for (uint8_t i = 0; i < sizeof(mcp2515_register_map); i++) {
		spi_putc(pgm_read_byte(&mcp2515_register_map[i]));
	}
	SET(MCP2515_CS);
	
	// nur Standard IDs, Message Rollover nach Puffer 1
	mcp2515_write_register(RXB0CTRL, (0 << RXM1) | (1 << RXM0) | (1 << BUKT));
	mcp2515_write_register(RXB1CTRL, (0 << RXM1) | (1 << RXM0));
	
	// MCP2515 zurueck in den normalen Modus versetzten
	mcp2515_write_register(CANCTRL, CLKOUT_PRESCALER_);
}
开发者ID:davidwe,项目名称:xpcc,代码行数:40,代码来源:mcp2515.c


示例8: mcp2515_read_status

// ----------------------------------------------------------------------------
uint8_t mcp2515_read_status(uint8_t type)
{
	uint8_t data;
	
	RESET(MCP2515_CS);
	
	spi_putc(type);
	data = spi_putc(0xff);
	
	SET(MCP2515_CS);
	
	return data;
}
开发者ID:BaconShaker,项目名称:raspy,代码行数:14,代码来源:mcp2515.c


示例9: term_getc

// ------------------------------------------------------------------------
uint8_t term_getc()
{
	uint8_t t;
	
	// read databyte
	RESET(RD);
	asm ("nop");
	
	t = PIN(USB_DATA);
	SET(RD);
	
	return t;
}
开发者ID:dergraaf,项目名称:can-debugger,代码行数:14,代码来源:termio.c


示例10: mcp2515_get_message

// ----------------------------------------------------------------------------
uint8_t mcp2515_get_message(tCAN *message)
{
	// read status
	uint8_t status = mcp2515_read_status(SPI_RX_STATUS);
	uint8_t addr;
	uint8_t t;
	if (bit_is_set(status,6)) {
		// message in buffer 0
		addr = SPI_READ_RX;
	}
	else if (bit_is_set(status,7)) {
		// message in buffer 1
		addr = SPI_READ_RX | 0x04;
	}
	else {
		// Error: no message available
		return 0;
	}

	RESET(MCP2515_CS);
	spi_putc(addr);
	
	// read id
	message->id  = (uint16_t) spi_putc(0xff) << 3;
	message->id |=            spi_putc(0xff) >> 5;
	
	spi_putc(0xff);
	spi_putc(0xff);
	
	// read DLC
	uint8_t length = spi_putc(0xff) & 0x0f;
	
	message->header.length = length;
	message->header.rtr = (bit_is_set(status, 3)) ? 1 : 0;
	
	// read data
	for (t=0;t<length;t++) {
		message->data[t] = spi_putc(0xff);
	}
	SET(MCP2515_CS);
	
	// clear interrupt flag
	if (bit_is_set(status, 6)) {
		mcp2515_bit_modify(CANINTF, (1<<RX0IF), 0);
	}
	else {
		mcp2515_bit_modify(CANINTF, (1<<RX1IF), 0);
	}
	
	return (status & 0x07) + 1;
}
开发者ID:BaconShaker,项目名称:raspy,代码行数:52,代码来源:mcp2515.c


示例11: SET

// write either command or data, with automatic 4/8-bit selection
void LiquidCrystal::send(unsigned char value, bool mode) {
    if (this->realTimeDisplay) {
        if (mode) {
            SET(_rs_pin);
        } else {
            RESET(_rs_pin);
        }

        write4bits(value >> 4);
        pulseEnable(1);
        write4bits(value);
        pulseEnable(delayAfterCommand);
    } else {
        if (!lcdActions.isFull()) {
开发者ID:norbim1,项目名称:preenFM2,代码行数:15,代码来源:LiquidCrystal.cpp


示例12: proc_activesource_read

int proc_activesource_read(char *page, char **start, off_t off, int count, int *eof, void *data_unused)
{
	unsigned short physAddr = 0;
	PR_INIT();

	physAddr = getActiveSource();

	len = sprintf(page, "%01x.%01x.%01x.%01x\n", (physAddr >> 12) & 0xf, (physAddr >> 8) & 0xf,
		      (physAddr >> 4)  & 0xf, (physAddr >> 0)  & 0xf);

	RESET(eventActiveSource);

	PR_EXIT(len)
}
开发者ID:Audioniek,项目名称:driver,代码行数:14,代码来源:cec_proc.c


示例13: ft_strcmp

int	ft_strcmp(const char *s1, const char *s2)
{
	int	a;
	int	b;

	if (s1 == NULL)
		return (0);
	RESET(a, b);
	while (s1[a] == s2[a] && s1[a] && s2[a])
	{
		a++;
	}
	b = s1[a] - s2[a];
	return (b);
}
开发者ID:Jihashtag,项目名称:Filler,代码行数:15,代码来源:ft_strcmp.c


示例14: mcp2515_read_register

// -------------------------------------------------------------------------
uint8_t mcp2515_read_register(uint8_t adress)
{
	uint8_t data;
	
	RESET(MCP2515_CS);
	
	spi_putc(SPI_READ);
	spi_putc(adress);
	
	data = spi_putc(0xff);	
	
	SET(MCP2515_CS);
	
	return data;
}
开发者ID:BaconShaker,项目名称:raspy,代码行数:16,代码来源:mcp2515.c


示例15: RESET

//reset all the ADS1299's settings.  Call however you'd like.  Stops all data acquisition
void ADS1299::resetADS(void)
{
  RESET();             // send RESET command to default all registers
  SDATAC();            // exit Read Data Continuous mode to communicate with ADS
  
  delay(100);
    
  // turn off all channels
  for (int chan=1; chan <= 8; chan++) {
    deactivateChannel(chan);
  }
  
  setSRB1(use_SRB1());  //set whether SRB1 is active or not
  
  
};
开发者ID:BornTomorrow,项目名称:EEGHacker,代码行数:17,代码来源:ADS1299.cpp


示例16: terminal_operation

void terminal_operation(ringbuf_t *tx, char *op0, char *op1, char *op2, char *op3) {
    if (!strcmp(op0, "help") || !strcmp(op0, "?")) {
        ringbuf_put_str(tx,
                "\tprint_time(t)\n"
                "\tadjust_time(at) [hand:y,M,d,h,m,s] [value(decimal)]\n"
                "\tRESET();\n"
                );
    }
    terminal_time(tx, op0, op1, op2);
    if (!strcmp(op0, "RESET();")) {
        RESET();
    }
    if (!strcmp(op0, "bootload")) {
        asm("goto   0x001C");
    }
}
开发者ID:kerikun11,项目名称:MPLABXProjects,代码行数:16,代码来源:main.c


示例17: getMotionBurst

void getMotionBurst(uint8_t *burst)
{
	RESET(P_NCS);
	
	spi_exch(MOTION_BURST);
	_delay_us(75);	// wait t_SRAD-MOT
	
	// read all 7 bytes (Motion, Delta_X, Delta_Y, SQUAL, Shutter_Upper, Shutter_Lower, Maximum Pixels)
	for(uint8_t i=0; i<7; i++)
	{
		burst[i] = spi_exch(0x00);
	}
	
	SET(P_NCS);
	_delay_us(1);
}
开发者ID:jbohren-forks,项目名称:cnc-msl,代码行数:16,代码来源:adns3080.c


示例18: terminal_operation

void terminal_operation(ringbuf_t *tx, char *op0, char *op1, char *op2, char *op3) {
    if (!strcmp(op0, "help") || !strcmp(op0, "?")) {
        ringbuf_put_str(tx,
                "\t*****************************\n"
                "\t**** Charge Station 6.12 ****\n"
                "\t**** Made by @Ryokeri14  ****\n"
                "\t*****************************\n\n"
                "\tprint_time(t)\n"
                "\tadjust_time(at) [hand:y,M,d,h,m,s] [value(decimal)]\n"
                "\tsettings(set) [port:left(l),center(c),right(r)]\n\t\t[auto_stop(as),always_on(ao),integrating_reset(ir)]\n"
                "\toutput_data(od) <- stopped by pressing the Enter key\n"
                "\ttouch [reset(r),initialize(init)] [value(%)]\n"
                "\n\tfor Developper\n"
                "\tRESET();\n"
                "\tbootload\n"
                );
    }
    terminal_time(tx, op0, op1, op2);
    if (!strcmp(op0, "RESET();")) {
        RESET();
    }
    if (!strcmp(op0, "bootload")) {
        bootload();
    }
    if (!strcmp(op0, "od") || !strcmp(op0, "output_data")) {
        terminal_data_out = 1;
    }
    if (!strcmp(op0, "")) {
        terminal_data_out = 0;
    }
    if (!strcmp(op0, "touch")) {
        if (!strcmp(op1, "initialize") || !strcmp(op1, "init")) {
            uint8_t percentage = atoi(op2);
            if (percentage <= 100) {
                ctmu_ratio = percentage;
                ctmu_set_ratio(ctmu_ratio);
                ringbuf_put_str(tx, "\tinitializing complete\n");
            } else {
                ringbuf_put_str(tx, "\tinvalid data\n\tinitializing failed\n");
            }
        }
        if (!strcmp(op1, "reset") || !strcmp(op1, "r")) {
            ctmu_set_ratio(ctmu_ratio);
            ringbuf_put_str(tx, "\tseting complete\n");
        }
    }
}
开发者ID:kerikun11,项目名称:MPLABXProjects,代码行数:47,代码来源:ChargeStation_task.c


示例19: term_putc

// ------------------------------------------------------------------------
void term_putc(const char c)
{
	// wait until ft245 ready to receive byte
	while (IS_SET(USB_TXE))
		;
	
	DDR(USB_DATA) = 0xff;
	PORT(USB_DATA) = c;
	
	// write data
	SET(WR);
	asm ("nop");
	RESET(WR);
	
	// use port as input, pull-ups on
	DDR(USB_DATA) = 0;
	PORT(USB_DATA) = 0xff;
}
开发者ID:dergraaf,项目名称:can-debugger,代码行数:19,代码来源:termio.c


示例20: read

uint8_t read(uint8_t address)
{
	RESET(P_NCS);
	
	spi_exch(address);
	if (address == 0x02) // is motion read?
	{
		_delay_us(75);	// wait t_SRAD-MOT
	}
	else 
	{
		_delay_us(50);	// wait t_SRAD
	}
	uint8_t ret = spi_exch(0x00);
	SET(P_NCS);
	_delay_us(1);	// wait t_SRR = 250ns
	return ret;
}
开发者ID:jbohren-forks,项目名称:cnc-msl,代码行数:18,代码来源:adns3080.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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