您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ Board_Init函数代码示例

51自学网 2021-06-01 19:55:23
  C++
这篇教程C++ Board_Init函数代码示例写得很实用,希望能帮到您。

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

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

示例1: main

int main(void){ unsigned long status;  Switch_Init();           // PA5 is input  status = Switch_Input(); // 0x00 or 0x20  status = Switch_Input(); // 0x00 or 0x20    Board_Init();             // initialize PF0 and PF4 and make them inputs                            // make PF3-1 out (PF3-1 built-in LEDs)  GPIO_PORTF_DIR_R |= (RED|BLUE|GREEN);                              // disable alt funct on PF3-1  GPIO_PORTF_AFSEL_R &= ~(RED|BLUE|GREEN);                              // enable digital I/O on PF3-1  GPIO_PORTF_DEN_R |= (RED|BLUE|GREEN);                              // configure PF3-1 as GPIO  GPIO_PORTF_PCTL_R = (GPIO_PORTF_PCTL_R&0xFFFF000F)+0x00000000;  GPIO_PORTF_AMSEL_R = 0;     // disable analog functionality on PF  while(1){    status = Board_Input();    switch(status){                    // switches are negative logic on PF0 and PF4      case 0x01: LEDS = BLUE; break;   // SW1 pressed      case 0x10: LEDS = RED; break;    // SW2 pressed      case 0x00: LEDS = GREEN; break;  // both switches pressed      case 0x11: LEDS = 0; break;      // neither switch pressed      default: LEDS = (RED|GREEN|BLUE);// unexpected return value    }  }}
开发者ID:OrlandoWzk,项目名称:TExaSware,代码行数:26,


示例2: main

/** * @brief	Main entry point * @return	Nothing */int main(void){	volatile uint32_t status;	SystemCoreClockUpdate();	Board_Init();	/* Initialize the OTP Controller */	status = Chip_OTP_Init();    /* Fix as per Errata, required for some LPC43xx parts */    OTP_fix(0, 0, 0, 0);    /* Set Boot Source */    /* Please note that this function is commented to avoid accidental     * programming of OTP values (which can result in not booting of boards).     * Make sure that you understand the OTP programming before you     * try this example     */#if (defined(BOARD_KEIL_MCB_1857) || defined(BOARD_KEIL_MCB_4357))    //status = Chip_OTP_ProgBootSrc(CHIP_OTP_BOOTSRC_PINS);#else    //status = Chip_OTP_ProgBootSrc(CHIP_OTP_BOOTSRC_SPIFI);#endif	while (1);}
开发者ID:edodm85,项目名称:LPCOpen-keil-lpc43xx,代码行数:31,


示例3: main

int main(void) {#if defined (__USE_LPCOPEN)    // Read clock settings and update SystemCoreClock variable    SystemCoreClockUpdate();#if !defined(NO_BOARD_LIB)    // Set up and initialize all required blocks and    // functions related to the board hardware    Board_Init();    // Set the LED to the state of "On"    Board_LED_Set(0, true);#endif#endif    // TODO: insert code here    Chip_SWM_MovablePortPinAssign(SWM_SWO_O, 1, 2);	SysTick_Config(SystemCoreClock / 1000);	printf("Started/n");	Setup();    i2cTest();    // Force the counter to be placed into memory    volatile static int i = 0 ;    // Enter an infinite loop, just incrementing a counter    while(1) {        i++ ;    }    return 0 ;}
开发者ID:SantunKoodia,项目名称:Fan-Control-System,代码行数:33,


示例4: main

int main(void) {	SystemCoreClockUpdate();	Board_Init();	Board_LED_Set(0, false);	// SW4 setup	Chip_GPIO_SetDir(LPC_GPIO, 1, 31, false);	sw4 = debounce_add(DEBOUNCE_TIME / DEBOUNCE_CYCLE, is_sw4_pushed, NULL);	// RGB Rojo	Chip_GPIO_SetDir(LPC_GPIO, 2, 0, true);	// RGB Verde	Chip_GPIO_SetDir(LPC_GPIO, 2, 1, true);	// RGB Azul	Chip_GPIO_SetDir(LPC_GPIO, 0, 26, true);	queue_init(&queue, 1, EventQueue, AlarmTimeoutPush, AlarmTimeoutPop, MutexQueue);	StartOS(AppMode1);	while (1) {	}	return 0;}
开发者ID:kamejoko80,项目名称:RTOS-FreeOSEK,代码行数:29,


示例5: main

/** * @brief	Main program body * @return	Does not return */int main(void){	/* Generic Initialization */	SystemCoreClockUpdate();	/* Board_Init calls Chip_GPIO_Init and enables GPIO clock if needed,	   Chip_GPIO_Init is not called again */	Board_Init();	Board_LED_Set(0, false);	/* Configure GPIO interrupt pin as input */	Chip_GPIO_SetPinDIRInput(LPC_GPIO, GPIO_INTERRUPT_PORT, GPIO_INTERRUPT_PIN);	/* Configure the GPIO interrupt */	Chip_GPIOINT_SetIntFalling(LPC_GPIOINT, GPIO_INTERRUPT_PORT, 1 << GPIO_INTERRUPT_PIN);	/* Enable interrupt in the NVIC */	NVIC_ClearPendingIRQ(GPIO_INTERRUPT_NVIC_NAME);	NVIC_EnableIRQ(GPIO_INTERRUPT_NVIC_NAME);	/* Wait for interrupts - LED will toggle on each wakeup event */	while (1) {		__WFI();	}	return 0;}
开发者ID:MFDM,项目名称:SE2-SV1314,代码行数:31,


示例6: main

/** * @brief	main routine for blinky example * @return	Function should not exit. */int main(void){	uint32_t sysTickRate;	SystemCoreClockUpdate();	Board_Init();	Board_LED_Set(0, false);	Board_LED_Set(1, true);	/* The sysTick counter only has 24 bits of precision, so it will	   overflow quickly with a fast core clock. You can alter the	   sysTick divider to generate slower sysTick clock rates. */	Chip_Clock_SetSysTickClockDiv(1);	/* A SysTick divider is present that scales the sysTick rate down	   from the core clock. Using the SystemCoreClock variable as a	   rate reference for the SysTick_Config() function won't work,	   so get the sysTick rate by calling Chip_Clock_GetSysTickClockRate() */	sysTickRate = Chip_Clock_GetSysTickClockRate();	/* Enable and setup SysTick Timer at a periodic rate */	SysTick_Config(sysTickRate / TICKRATE_HZ1);	/* LEDs toggle in interrupt handlers */	while (1) {		__WFI();	}	return 0;}
开发者ID:0xBADCA7,项目名称:lk,代码行数:34,


示例7: main

/** * @brief	Main routine for I2C example * @return	Function should not exit */int main(void){	/* Generic Initialization */	SystemCoreClockUpdate();	Board_Init();	Board_LED_Set(0, false);	/* Setup I2C at the board level (usually pin muxing) */	Init_I2C_PinMux();	/* Allocate I2C handle, setup I2C rate, and initialize I2C	   clocking */	setupI2CSlave();	/* Enable the interrupt for the I2C */	NVIC_EnableIRQ(I2C_IRQn);	/* Setup I2C receive slave mode - this will setup a	   non-blocking I2C mode which will be handled via the I2C interrupt */	readI2CSlave();	/* From master first */	/* I2C slave handler loop - wait for requests from master and	   receive or send data */	while (1) {		/* Sleep while waiting for I2C master requests */		__WFI();		/* All I2C slave processing is performed in the I2C IRQ		   handler, so there is nothing to really do here */	}	return 0;}
开发者ID:dmamalis,项目名称:LPC812,代码行数:38,


示例8: main

/** * @brief	Main program body * @return	int */int main(void){	int tmp = 0;	int activityIndex = 0;	int writeVal = 0;	SystemCoreClockUpdate();	Board_Init();	i2c_app_init(I2C0, SPEED_100KHZ);	/* Loop forever */	while (1) {		/* Toggle LED to show activity. */		tmp = ShowActivity(tmp);		/* Test for activity time */		if ((tmp & ACTIVITY_MASK) == 0) {			/* Toggle between writes and reads */			switch (activityIndex++ & 1) {			case 0:				/* Perform target board I2CM write */				WriteBoard_I2CM(writeVal++ & 1);				break;			case 1:			default:				/* Perform target board I2CM read */				ReadBoard_I2CM();				break;			}		}	}	return 0;}
开发者ID:edodm85,项目名称:LPCOpen-keil-lpc43xx,代码行数:39,


示例9: main

/** * @brief	main routine for hello world example * @return	Function should not exit. */int main(void){	volatile uint32_t *vt;	uint32_t cpu_id;	SystemCoreClockUpdate();	Board_Init();	/* Enable SysTick Timer */	SysTick_Config(SystemCoreClock / TICKRATE_HZ);	/* Display system information */	__disable_irq();	DEBUGOUT("System Clock: %uMHz/r/n", SystemCoreClock / 1000000);	DEBUGOUT("Device ID: 0x%04X/r/n", Chip_SYSCTL_GetDeviceID());	vt = &(SCB->VTOR);	cpu_id = SCB->CPUID;	DEBUGOUT("VTOR Address: 0x%08X/r/n", (uint32_t) vt);	DEBUGOUT("CPU ID: 0x%08X/r/n", (uint32_t) cpu_id);	__enable_irq();	/* Loop forever */	while (1) {		__WFI();	}	//	return 0;}
开发者ID:Magicoe,项目名称:LPC820,代码行数:30,


示例10: main

/** * @brief	Main UART program body * @return	Doesn't return */int main(void){	/* initialize the board */	SystemCoreClockUpdate();	Board_Init();	Board_CMP_Init();	/* initialize the CMP */	Chip_CMP_Init();	/* Power-up */	Chip_CMP_EnableCurrentSrc(CMP_ENCTRL_ENABLE);	Chip_CMP_EnableBandGap(CMP_ENCTRL_ENABLE);	Chip_CMP_Enable(CMP_ID, CMP_ENCTRL_ENABLE);		/* Positive and negative references, both edges, no hysteresis */	Chip_CMP_SetPosVoltRef(CMP_ID, CMP_INPUT_CMPx_IN0);	Chip_CMP_SetNegVoltRef(CMP_ID, CMP_INPUT_INTERNAL_09VBG);	Chip_CMP_SetHysteresis(CMP_ID, CMP_HYS_NONE);		while (1) {		if (Chip_CMP_GetCmpStatus(CMP_ID)) {			Board_LED_Set(0, false);		}		else {			Board_LED_Set(0, true);		}	}	return 0;}
开发者ID:TiddoLangerak,项目名称:mmc_test,代码行数:36,


示例11: main

/** * @brief	main routine for blinky example * @return	Function should not exit. */int main(void){	uint32_t timerFreq;	/* Generic Initialization */	SystemCoreClockUpdate();	Board_Init();	/* Enable timer 1 clock */	Chip_TIMER_Init(LPC_TIMER0);	/* Timer rate is system clock rate */	timerFreq = Chip_Clock_GetSystemClockRate();	/* Timer setup for match and interrupt at TICKRATE_HZ */	Chip_TIMER_Reset(LPC_TIMER0);	Chip_TIMER_MatchEnableInt(LPC_TIMER0, 1);	Chip_TIMER_SetMatch(LPC_TIMER0, 1, (timerFreq / TICKRATE_HZ1));	Chip_TIMER_ResetOnMatchEnable(LPC_TIMER0, 1);	Chip_TIMER_Enable(LPC_TIMER0);	/* Enable timer interrupt */	NVIC_ClearPendingIRQ(TIMER0_IRQn);	NVIC_EnableIRQ(TIMER0_IRQn);	/* LEDs toggle in interrupt handlers */	while (1) {		__WFI();	}	return 0;}
开发者ID:MFDM,项目名称:SE2-SV1314,代码行数:36,


示例12: main

/** * @brief	Main routine for SSP example * @return	Nothing */int main(void){	SystemCoreClockUpdate();	Board_Init();	/* SSP initialization */	Board_SSP_Init(LPC_SSP);	Chip_SSP_Init(LPC_SSP);	ssp_format.frameFormat = SSP_FRAMEFORMAT_SPI;	ssp_format.bits = SSP_DATA_BITS;	ssp_format.clockMode = SSP_CLOCK_MODE0;	Chip_SSP_SetFormat(LPC_SSP, ssp_format.bits, ssp_format.frameFormat, ssp_format.clockMode);	Chip_SSP_Enable(LPC_SSP);	/* Initialize GPDMA controller */	Chip_GPDMA_Init(LPC_GPDMA);	/* Setting GPDMA interrupt */	NVIC_DisableIRQ(DMA_IRQn);	NVIC_SetPriority(DMA_IRQn, ((0x01 << 3) | 0x01));	NVIC_EnableIRQ(DMA_IRQn);	/* Setting SSP interrupt */	NVIC_EnableIRQ(SSP_IRQ);	appSSPMainMenu();	/* DeInitialize SSP peripheral */	Chip_SSP_DeInit(LPC_SSP);	return 0;}
开发者ID:TiddoLangerak,项目名称:mmc_test,代码行数:39,


示例13: main

/** * @brief	main routine for ADC example * @return	Function should not exit */int main(void){	uint16_t dataADC;	int j;	SystemCoreClockUpdate();	Board_Init();	Init_ADC_PinMux();	DEBUGSTR("ADC Demo/r/n");	/* ADC Init */	Chip_ADC_Init(LPC_ADC, &ADCSetup);	Chip_ADC_EnableChannel(LPC_ADC, ADC_CH0, ENABLE);	while (1) {		/* Start A/D conversion */		Chip_ADC_SetStartMode(LPC_ADC, ADC_START_NOW, ADC_TRIGGERMODE_RISING);		/* Waiting for A/D conversion complete */		while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH0, ADC_DR_DONE_STAT) != SET) {}		/* Read ADC value */		Chip_ADC_ReadValue(LPC_ADC, ADC_CH0, &dataADC);		/* Print ADC value */		DEBUGOUT("ADC value is 0x%x/r/n", dataADC);		/* Delay */		j = 500000;		while (j--) {}	}	/* Should not run to here */	return 0;}
开发者ID:Andriiy,项目名称:Circuit-Boards,代码行数:39,


示例14: main

/** * @brief	MRT example main function * @return	Status (This function will not return) */int main(void){	int mrtch;	/* Generic Initialization */	SystemCoreClockUpdate();	Board_Init();	DEBUGSTR("LPC15xx MRT Example /r/n");	/* MRT Initialization and disable all timers */	Chip_MRT_Init();	for (mrtch = 0; mrtch < MRT_CHANNELS_NUM; mrtch++) {		Chip_MRT_SetDisabled(Chip_MRT_GetRegPtr(mrtch));	}	/* Enable the interrupt for the MRT */	NVIC_EnableIRQ(MRT_IRQn);	/* Enable timers 0 and 1 in repeat mode with different rates */	setupMRT(0, MRT_MODE_REPEAT, 2);/* 2Hz rate */	setupMRT(1, MRT_MODE_REPEAT, 5);/* 5Hz rate */	/* Enable timer 2 in single one mode with the interrupt restarting the	   timer */	setupMRT(2, MRT_MODE_ONESHOT, 7);	/* Will fire in 1/7 seconds */	/* All processing and MRT reset in the interrupt handler */	while (1) {		__WFI();	}	return 0;}
开发者ID:frankzzcn,项目名称:M2_SE_RTOS_Project,代码行数:38,


示例15: main

/** * @brief	Main routine for SPI example * @return	Function should not exit */int main(void){	/* Generic Initialization */	SystemCoreClockUpdate();	Board_Init();	/* Clear activity LED */	Board_LED_Set(0, false);	/* Setup SPI pin muxing */	Init_SPI_PinMux();	/* Allocate SPI handle, setup rate, and initialize clocking */	setupSpiMaster();	/* Enable SPI0 interrupt */	NVIC_EnableIRQ(SPI0_IRQn);	/* Loop forever */	while (1) {		/* Write simple message over SPI */		WriteSpiMssg(xferArray, sizeof(xferArray) / sizeof(xferArray[0]));		/* Toggle LED to show activity. */		Board_LED_Toggle(0);	}	/* Code never reaches here. Only used to satisfy standard main() */	return 0;}
开发者ID:JamesHinnant,项目名称:osp,代码行数:34,


示例16: main

/** * @brief	main routine for USB example * @return	Function should not exit. */int main(void){	/* Initialize board and chip */	SystemCoreClockUpdate();	Board_Init();	/* Init USB subsystem and LibUSBDevice */	libusbdev_init(USB_STACK_MEM_BASE, USB_STACK_MEM_SIZE);	while (1) {		/* wait until host is connected */		while (libusbdev_Connected() == 0) {			/* Sleep until next IRQ happens */			__WFI();		}		while (libusbdev_Connected()) {			if (libusbdev_QueueReadDone() != -1) {				/* Dummy process read data ......*/				/* requeue read request */				libusbdev_QueueReadReq(g_rxBuff, PACKET_BUFFER_SIZE);			}			if (libusbdev_QueueSendDone() == 0) {				/* Queue send request */				libusbdev_QueueSendReq(g_rxBuff, PACKET_BUFFER_SIZE);			}		}	}}
开发者ID:edodm85,项目名称:LPCOpen-keil-lpc43xx,代码行数:36,


示例17: prvSetupHardware

/* Sets up system hardware */static void prvSetupHardware(void){	Board_Init();	/* Initial LED0 state is off */	Board_LED_Set(0, false);}
开发者ID:nopodige,项目名称:bike_tire_video,代码行数:8,


示例18: main

/** * @brief	main routine for ATIMER example * @return	Nothing (function should not exit) */int main(void){	bool On = false;	SystemCoreClockUpdate();	Board_Init();	/* Init Alarm Timer with Preset Count for about 1s */	Chip_ATIMER_Init(LPC_ATIMER, PresetCount);	/* Init EVRT */	Chip_EVRT_Init();	/* Enable EVRT in order to be able to read the ATIMER interrupt */	Chip_EVRT_ConfigIntSrcActiveType(EVRT_SRC_ATIMER, EVRT_SRC_ACTIVE_HIGH_LEVEL);	/* Enable Alarm Timer Source */	Chip_EVRT_SetUpIntSrc(EVRT_SRC_ATIMER, ENABLE);	/* Enable NVIC */	NVIC_EnableIRQ(EVENTROUTER_IRQn);	/* Clear the interrupt states */	ATIMER_ClearInts();	/* Enable Alarm Timer */	Chip_ATIMER_IntEnable(LPC_ATIMER);	while (1) {		/* Sleep until ATIMER fires */		__WFI();		On = (bool) !On;		Board_LED_Set(1, On);	}}
开发者ID:fcladera,项目名称:ciaa_lpcopen_bare,代码行数:39,


示例19: main

int main(void) {	//preparing the chip & board	SystemCoreClockUpdate();	Board_Init();	PWM_Init();	PWM_SetCycle(400,1000);	//the actual code	Chip_ADC_Init(_LPC_ADC_ID, &ADCSetup);	Chip_ADC_EnableChannel(_LPC_ADC_ID, _ADC_CHANNLE, ENABLE);	Chip_ADC_SetBurstCmd(_LPC_ADC_ID, ENABLE);	//int i;	SysTick_Config(SystemCoreClock / TICKRATE_HZ1);    while(1) {    	__WFI();    	/*    	if(rotation_counter==MEMORY_CAPACITY){			//not rotation_cycle?    		for(i=0;i<MEMORY_CAPACITY;i++){    		DEBUGOUT("%d /n",rotation_debug_holder[i]);//,rotation_debug_holder2[i]);    		}    		rotation_counter++;    	}    	*/    }    return 0 ;}
开发者ID:helipiotr,项目名称:mouse_treadmill,代码行数:31,


示例20: main

/** * @brief	Main routine for I2C example * @return	Function should not exit */int main(void){	uint8_t rxbuf[RX_SZ + 2];	/* Generic Initialization */	SystemCoreClockUpdate();	Board_Init();	/* Initialize the PinMux and setup the memory for ROM driver */	uartrom_init();	/* Configure the ADC */	uartrom_config();	uartrom_regcb();/* Register call-back functions */	ROM_UART_Send(hUART, msg, sizeof(msg) - 1);	while (!tx_done) {		__WFI();	}	while (1) {		rx_done = 0;		ROM_UART_Receive(hUART, rxbuf, RX_SZ);		while (!rx_done) {			__WFI();		}		tx_done = 0;		ROM_UART_Send(hUART, rxbuf, rx_done);		while (!tx_done) {			__WFI();		}	}	return 0;}
开发者ID:JamesHinnant,项目名称:osp,代码行数:37,


示例21: initHardware

static void initHardware(void){    SystemCoreClockUpdate();    SysTick_Config(SystemCoreClock/1000);    Board_Init();    Board_LED_Set(0, false);    /* Timer */    Chip_TIMER_Init(LPC_TIMER1);    Chip_TIMER_PrescaleSet(LPC_TIMER1,#ifdef lpc1769                           Chip_Clock_GetPeripheralClockRate(SYSCTL_PCLK_TIMER1) / 1000000 - 1#else                           Chip_Clock_GetRate(CLK_MX_TIMER1) / 1000000 - 1#endif                          );    /* Match 0 (period) */    Chip_TIMER_MatchEnableInt(LPC_TIMER1, 0);    Chip_TIMER_ResetOnMatchEnable(LPC_TIMER1, 0);    Chip_TIMER_StopOnMatchDisable(LPC_TIMER1, 0);    Chip_TIMER_SetMatch(LPC_TIMER1, 0, 1000);    /* Match 1 (duty) */    Chip_TIMER_MatchEnableInt(LPC_TIMER1, 1);    Chip_TIMER_ResetOnMatchDisable(LPC_TIMER1, 1);    Chip_TIMER_StopOnMatchDisable(LPC_TIMER1, 1);    Chip_TIMER_SetMatch(LPC_TIMER1, 1, 100);    Chip_TIMER_Reset(LPC_TIMER1);    Chip_TIMER_Enable(LPC_TIMER1);    NVIC_EnableIRQ(TIMER1_IRQn);}
开发者ID:pridolfi,项目名称:workspace,代码行数:34,


示例22: main

/** * @brief	main routine for example * @return	Function should not exit. */int main(void){	USBD_API_INIT_PARAM_T usb_param;	USB_CORE_DESCS_T desc;	ErrorCode_t ret = LPC_OK;	/* Initialize board and chip */	SystemCoreClockUpdate();	Board_Init();	/* Init millisecond timer tick driver */	systick_init();	/* enable clocks and pinmux */	usb_pin_clk_init();	/* initialize call back structures */	memset((void *) &usb_param, 0, sizeof(USBD_API_INIT_PARAM_T));	usb_param.usb_reg_base = LPC_USB_BASE + 0x200;	usb_param.max_num_ep = 2;	usb_param.mem_base = USB_STACK_MEM_BASE;	usb_param.mem_size = USB_STACK_MEM_SIZE;	/* Set the USB descriptors */	desc.device_desc = (uint8_t *) USB_DeviceDescriptor;	desc.string_desc = (uint8_t *) USB_StringDescriptor;	/* Note, to pass USBCV test full-speed only devices should have both	 * descriptor arrays point to same location and device_qualifier set	 * to 0.	 */	desc.high_speed_desc = USB_FsConfigDescriptor;	desc.full_speed_desc = USB_FsConfigDescriptor;	desc.device_qualifier = 0;	/* USB Initialization */	ret = USBD_API->hw->Init(&g_hUsb, &desc, &usb_param);	if (ret == LPC_OK) {		/* Mice are generally low or full speed devices and not high speed. */		USBD_API->hw->ForceFullSpeed(g_hUsb, 1);		ret = Keyboard_init(g_hUsb,			(USB_INTERFACE_DESCRIPTOR *) &USB_FsConfigDescriptor[sizeof(USB_CONFIGURATION_DESCRIPTOR)],			&usb_param.mem_base, &usb_param.mem_size);		if (ret == LPC_OK) {			/*  enable USB interrupts */			NVIC_EnableIRQ(USB_IRQn);			/* now connect */			USBD_API->hw->Connect(g_hUsb, 1);		}	}	while (1) {		/* Do Keyboard tasks */		Keyboard_Tasks();		/* Sleep until next IRQ happens */		__WFI();	}}
开发者ID:MFDM,项目名称:SE2-SV1314,代码行数:63,


示例23: prvSetupHardware

/* Sets up system hardware */static void prvSetupHardware(void){	SystemCoreClockUpdate();	Board_Init();	/* Initial LED0 state is off */	Board_LED_Set(0, false);}
开发者ID:fcladera,项目名称:ciaa_lpcopen_bare,代码行数:9,


示例24: initHardware

static void initHardware(void){    SystemCoreClockUpdate();    Board_Init();    Board_LED_Set(0, false);}
开发者ID:pridolfi,项目名称:workspace,代码行数:8,


示例25: main

/** * @brief	main routine for timer example * @return	Function should not exit. */int main(void){	uint32_t timerBaseClock;	SystemCoreClockUpdate();	Board_Init();	Board_LED_Set(0, false);	Board_LED_Set(1, false);	/* Initialize Timer 0 and Timer 1 */	Chip_TIMER_Init(LPC_TIMER0);	Chip_TIMER_Init(LPC_TIMER1);	/* Setup prescale value on Timer 0 to PCLK */	Chip_TIMER_PrescaleSet(LPC_TIMER0, 0);	/* Setup prescale value on Timer 1 for lower resolution */	Chip_TIMER_PrescaleSet(LPC_TIMER1, PRESCALE_HZ2);	/* Reset timers */	Chip_TIMER_Reset(LPC_TIMER0);	Chip_TIMER_Reset(LPC_TIMER1);	/* Enable both timers to generate interrupts when time matches */	Chip_TIMER_MatchEnableInt(LPC_TIMER0, 1);	Chip_TIMER_MatchEnableInt(LPC_TIMER1, 1);	/* Get rate of timer base clock */	timerBaseClock = Chip_Clock_GetAsyncSyscon_ClockRate();	/* Setup Timer 0 for a match every 1s */	Chip_TIMER_SetMatch(LPC_TIMER0, 1, (timerBaseClock / TICKRATE_HZ1));	/* Setup Timer 1 for a match twice in a second */	Chip_TIMER_SetMatch(LPC_TIMER1, 1, (timerBaseClock / ((PRESCALE_HZ2 + 1) * TICKRATE_HZ2)) );	/* Setup both timers to restart when match occurs */	Chip_TIMER_ResetOnMatchEnable(LPC_TIMER0, 1);	Chip_TIMER_ResetOnMatchEnable(LPC_TIMER1, 1);	/* Start both timers */	Chip_TIMER_Enable(LPC_TIMER0);	Chip_TIMER_Enable(LPC_TIMER1);	/* Clear both timers of any pending interrupts */	NVIC_ClearPendingIRQ(CT32B0_IRQn);	NVIC_ClearPendingIRQ(CT32B1_IRQn);	/* Enable both timer interrupts */	NVIC_EnableIRQ(CT32B0_IRQn);	NVIC_EnableIRQ(CT32B1_IRQn);	/* Wait for timers to generate interrupts (LEDs toggle in interrupt handlers) */	while (1) {		__WFI();	}	return 0;}
开发者ID:JamesHinnant,项目名称:osp,代码行数:62,


示例26: prvSetupHardware

/* Sets up system hardware */static void prvSetupHardware(void){	SystemCoreClockUpdate();	Board_Init();	/* LED0 is used for the link status, on = PHY cable detected */	/* Initial LED state is off to show an unconnected cable state */	Board_LED_Set(0, false);}
开发者ID:TiddoLangerak,项目名称:mmc_test,代码行数:10,


示例27: SetupHardware

/** Configures the board hardware and chip peripherals for the demo's functionality. */static void SetupHardware(void){	SystemCoreClockUpdate();	Board_Init();	Chip_USB_Init();	USB_Init(FlashDisk_MS_Interface.Config.PortNumber, USB_MODE_Host);	/* Hardware Initialization */	Board_Debug_Init();}
开发者ID:ttzeng,项目名称:lpcopen,代码行数:10,


示例28: main

int main(void) {	Dice noppa;	uint32_t sysTickRate;#if defined (__USE_LPCOPEN)    // Read clock settings and update SystemCoreClock variable    SystemCoreClockUpdate();#if !defined(NO_BOARD_LIB)    // Set up and initialize all required blocks and    // functions related to the board hardware    Board_Init();    // Set the LED to the state of "On"    Board_LED_Set(0, true);#endif#endif	sysTickRate = Chip_Clock_GetSysTickClockRate();	// M
C++ Board_LED_Set函数代码示例
C++ BoardInit函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。