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


C++ LEDs_Init函数代码示例

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


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

示例1: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware()
{
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);

	/* Hardware Initialization */
	LEDs_Init();
	Buttons_Init();
	USB_Init();
}
开发者ID:jdeblese,项目名称:tenkey,代码行数:15,代码来源:tenkey.c

示例2: SetupHardware

void SetupHardware(void)
{
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);

	/* Hardware Initialization */
	SerialStream_Init(9600, false);
	LEDs_Init();
	USB_Init();
}
开发者ID:TomMD,项目名称:teensy,代码行数:14,代码来源:BluetoothHost.c

示例3: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
	char stopMostSentencesString[] = "$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n";
	char kickLoggerString[] = "$PMTK185,0*22\r\n";
	char nmea10sec[] = "$PMTK220,10000*2F\r\n";
	
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);

	/* Hardware Initialization */
	LEDs_Init();

	LEDs_SetAllLEDs(1);

	_delay_ms(100);

	// Hard set the baud rate to 9600 since that's the rate that the USART runs at
	setBaudRate9600();

	_delay_ms(100);

	// Set NMEA sentence output frequencies
	// PMTK_API_SET_NMEA_OUTPUT
	// $PMTK314,... is the command
	
	outStringToGPS(stopMostSentencesString);
	_delay_ms(100);

	// Set the NMEA port update rate to 10 seconds

	outStringToGPS(nmea10sec);
	_delay_ms(100);

	// Kick the GPS LOCUS to start logging data
	// PMTK_LOCUS_STARTLOG
	// $PMTK185,0*22 is the command
	
	outStringToGPS(kickLoggerString);
	_delay_ms(100);

	USB_Init();

	/* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */
	TCCR0B = (1 << CS02);
}
开发者ID:ASHOK1991,项目名称:lb-Arduino-Code,代码行数:50,代码来源:USBtoSerial.c

示例4: SetupHardware

void SetupHardware(void) {
  connected = false;

  // Disable watchdog if enabled by bootloader/fuses
  MCUSR &= ~(1 << WDRF);
  wdt_disable();

  // Disable clock division
  clock_prescale_set(clock_div_1);

  // Hardware Initialization
  LEDs_Init();
  USB_Init();
  InitDMXOut();
}
开发者ID:obijywk,项目名称:avrdmx,代码行数:15,代码来源:avrdmx.c

示例5: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);

	/* Hardware Initialization */
	Joystick_Init();
	LEDs_Init();
	USB_Init();
	SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
}
开发者ID:Saectar,项目名称:manga-screen,代码行数:16,代码来源:VirtualSerialMouse.c

示例6: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
#if (ARCH == ARCH_AVR8)
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);
#endif

	/* Hardware Initialization */
	LEDs_Init();
	USB_Init();
}
开发者ID:UltimateHackingKeyboard,项目名称:bootloader-right,代码行数:16,代码来源:USBtoSerial.c

示例7: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable Clock Division */
	CLKPR = (1 << CLKPCE);
	CLKPR = 0;

	/* Hardware Initialization */
	SerialStream_Init(9600, false);
	LEDs_Init();
	USB_Init();
}
开发者ID:G33KatWork,项目名称:XBox-360-AVR-flasher,代码行数:16,代码来源:StillImageHost.c

示例8: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);

	/* Hardware Initialization */
	LEDs_Init();
	USB_Init();

	/* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */
	TCCR0B = (1 << CS02);
}
开发者ID:AdjacentReality,项目名称:lufa-lib,代码行数:17,代码来源:USBtoSerial.c

示例9: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);

	/* Hardware Initialization */
	//Serial_Init(9600, false);
	// the rest of serial_init is done by ReconfigureUSART
	DDRD  |= (1 << 3);
    PORTD |= (1 << 2);
	LEDs_Init();
	USB_Init();
}
开发者ID:theojulienne,项目名称:penprog-firmware,代码行数:18,代码来源:USBtoSerial.c

示例10: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);

	DDRC  = 0x00;
	PORTC = 0x00;
	OUTPUT(USBLED)
	SET(USBLED);
	/* Hardware Initialization */
	LEDs_Init();
	// USB_Init();
}
开发者ID:meowthsli,项目名称:Poppy,代码行数:18,代码来源:GenericHID.c

示例11: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
    /* Disable watchdog if enabled by bootloader/fuses */
    MCUSR &= ~(1 << WDRF);
    wdt_disable();

    /* Disable clock division */
    clock_prescale_set(clock_div_1);

    RFM12B_SPI_Init();

    /* Commands are not accepted while the RF12 is in reset so
       keep reading the status until the POR bit is clear    */
    
    uint16_t status = RFM12B_SPI_Transfer( 0 );
    while ( status & 0x4000 )
        status = RFM12B_SPI_Transfer( 0 );
    
    /* For commands see also http://tools.jeelabs.org/rfm12b */
    
    RFM12B_SPI_Transfer(0x80E7);  /* 868MHz, 12pF, el=1, ef=1 */ 
    RFM12B_SPI_Transfer(0xA640);  /* centre Frequency = 868MHz */ 
    RFM12B_SPI_Transfer(0xC606);  /* Data Rate approx 49.2 Kbps, (10000/29/(1+6)) Kbps */
    RFM12B_SPI_Transfer(0x94A2);  /* VDI,FAST,134kHz,0dBm,-91dBm */ 
    RFM12B_SPI_Transfer(0xC2AC);  /* AL,!ml,DIG,DQD4 */ 
    RFM12B_SPI_Transfer(0xCA83);  /* FIFO8,2-SYNC,!ff,DR */ 
    RFM12B_SPI_Transfer(0xCE55);  /* Group? = 0x55 */
    RFM12B_SPI_Transfer(0xC483);  /* @PWR,NO RSTRIC,!st,!fi,OE,EN */ 
    RFM12B_SPI_Transfer(0x9850);  /* !mp,90kHz,MAX OUT */ 
    RFM12B_SPI_Transfer(0xCC77);  /* OB1,OB0, LPX,!ddy,DDIT,BW0  */ 
    RFM12B_SPI_Transfer(0xE000);  /* NOT USE */ 
    RFM12B_SPI_Transfer(0xC800);  /* NOT USE */ 
    RFM12B_SPI_Transfer(0xC049);  /* 1.66MHz, 3.1V */ 

    RxLength = 0;
    RFM12B_SPI_Transfer(0x82DD);  /* Turn Receiver On */
    RFM12B_Transmit_Active = false;


    /* Hardware Initialization */
    LEDs_Init();
    USB_Init();

    /* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */
    TCCR0B = (1 << CS02);
}
开发者ID:SimonFoster,项目名称:Minimus-RF12,代码行数:47,代码来源:RF12toSerial.c

示例12: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
    /* Disable watchdog if enabled by bootloader/fuses */
    MCUSR &= ~(1 << WDRF);
    wdt_disable();

    /* Disable clock division */
    clock_prescale_set(clock_div_1);

    /* Hardware Initialization */
    LEDs_Init();
    USB_Init();
    Serial_Init(9600, false);

    /* Create a stdio stream for the serial port for stdin and stdout */
    Serial_CreateStream(NULL);
}
开发者ID:danielilie,项目名称:CANBus-Triple,代码行数:18,代码来源:Sideshow.c

示例13: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
    /* Disable watchdog if enabled by bootloader/fuses */
    MCUSR &= ~(1 << WDRF);
    wdt_disable();

    /* Disable Clock Division */
    CLKPR = (1 << CLKPCE);
    CLKPR = 0;

    /* Hardware Initialization */
    Serial_Init(9600, false);
    LEDs_Init();
    USB_Init();

    /* Create a stdio stream for the serial port for stdin and stdout */
    Serial_CreateStream(NULL);
}
开发者ID:nGoline,项目名称:mooltipass,代码行数:19,代码来源:StillImageHost.c

示例14: SetupHardware

void SetupHardware(void)
{
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);

	/* Setup timer */
	TCCR1B = 0x03;  /* timer rate clk/64 */
	TIMSK1 = 0x01;

	/* Hardware Initialization */
	LEDs_Init();
	USB_Init();
	sei(); 
}
开发者ID:RancidoPS3ita,项目名称:Psgroove_Hermes_V.4_Modded,代码行数:18,代码来源:psgroove.c

示例15: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
    /* Disable watchdog if enabled by bootloader/fuses */
    MCUSR &= ~(1 << WDRF);
    wdt_disable();

    /* Disable clock division */
    clock_prescale_set(clock_div_1);

    Serial_Init(115200, true);
    /* Hardware Initialization */
    LEDs_Init();
    USB_Init();

    UCSR1B = ((1 << RXCIE1) | (1 << TXEN1) | (1 << RXEN1));

    LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
开发者ID:eskerda,项目名称:arduines,代码行数:19,代码来源:Gamepad.c


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