本文整理汇总了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();
}
示例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();
}
示例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);
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}