本文整理汇总了C++中Set_System函数的典型用法代码示例。如果您正苦于以下问题:C++ Set_System函数的具体用法?C++ Set_System怎么用?C++ Set_System使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Set_System函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initUSB_CDC
/**
* @brief Configure the USB in CDC mode.
* @retval None
*/
void initUSB_CDC(void) {
Set_System();
Set_USBClock();
USB_Interrupts_Config();
USB_Init_Dynamic(&Device_Property_CDC, &User_Standard_Requests_CDC);
// now device state is UNCONNECTED
}
示例2: main
int main(void)
{
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
GPIOA->CRH &= !(GPIO_CRH_CNF8_0 | GPIO_CRH_CNF8_1);
GPIOA->CRH = GPIO_CRH_MODE8_1;
GPIOA->BSRR = GPIO_BSRR_BS8;
Set_System();
Set_USBClock();
USB_Interrupts_Config();
USB_Init();
while (1)
{
packet_buffer_to_rx_fifo();
rx_fifo_to_tx_fifo();
tx_fifo_to_packet_buffer();
// if(GPIO_ReadInputDataBit (GPIOA, GPIO_Pin_8))
// {
// GPIO_ResetBits(GPIOA, GPIO_Pin_8);
// }
// else
// {
// GPIO_SetBits(GPIOA, GPIO_Pin_8);
// }
}
}
示例3: main
/*******************************************************************************
* Function Name : main.
* Descriptioan : Main routine.
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
int main(void)
{
int i;
/* Set the Vector Table base adress at 0x8004000 */
NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x4000);
// Disable JTAG not the SWD
RCC_APB2PeriphClockCmd( RCC_APB2Periph_AFIO , ENABLE);
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
Set_System();
Set_USBClock();
USB_Interrupts_Config();
USB_Init();
for(i = 0; i < 27; i++) TestBuffer[i] = i % 9;
while (1)
{
if (bDeviceState == CONFIGURED)
{
//CDC_Send_DATA ((unsigned char*)TestBuffer,27);
//Delay(0xFFF);
CDC_Receive_DATA();
// Check to see if we have data yet
if (Receive_length != 0)
{
if (packet_sent == 1)
CDC_Send_DATA ((unsigned char*)Receive_Buffer,Receive_length);
Receive_length = 0;
}
}
}
}
示例4: main
/*******************************************************************************
* Function Name : main.
* Description : main routine.
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
int main(void)
{
Set_System();
USB_Interrupts_Config();
Set_USBClock();
USB_Init();
uint16_t counter = 0;
while (1)
{
TheReport.SAX = 32768;
TheReport.SAY = counter;
++counter;
if (bDeviceState == CONFIGURED)
{
if (PrevXferComplete)
{
RHIDCheckState();
}
}
}
}
示例5: main
int main(void)
{
/* USART1 config */
USART1_Config();
LED_GPIO_Config();
/*初始化SD卡*/
Set_System();
/*设置USB时钟为48M*/
Set_USBClock();
/*配置USB中断(包括SDIO中断)*/
USB_Interrupts_Config();
/*USB初始化*/
USB_Init();
while (bDeviceState != CONFIGURED); //等待配置完成
printf("\r\n 野火 ISO STM32 USB MASS STORAGE 实验\r\n");
while (1)
{
LED1_TOGGLE;
USB_Delay(0x0FFFFF);
}
}
示例6: main
int main()
{
SysTick_Config(SystemCoreClock/1000);
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable,ENABLE);
Set_System();
Set_USBClock();
USB_Interrupts_Config();
USB_Init();
/*
* GPIO_Config();
*
* GPIOA->BSRR = GPIO_Pin_15;
*
* while (1)
* {
* if (bDeviceState == CONFIGURED) {
* CDC_Receive_DATA();
* [>Check to see if we have data yet <]
* if (Receive_length != 0) {
* if (packet_sent == 1)
* CDC_Send_DATA((unsigned char*) Receive_Buffer, Receive_length);
* Receive_length = 0;
* }
* }
* }
*/
while(1);
}
示例7: cliInit
void cliInit(void)
{
Set_System();
Set_USBClock();
USB_Interrupts_Config();
USB_Init();
}
示例8: main
void main(void)
{
/*--------------initialization-----------*/
Set_System();
NVIC_Configuration();
GPIO_Config();
SD_Card_Check();
USB_Init();
ADC_Configuration();
Timer_Configuration();
LCD_Initial();
Clear_Screen(BLACK);
Display_Logo(110,150);
/*----------Power ON Information----------*/
Display_Str(80, 87, GRN, PRN, "System Initializing");
Display_Str(102, 71, GRN, PRN, "Please Wait");
Display_Str(8, 39, WHITE, PRN, "DSO FW Copyright (c) BenF 2010-2011");
Display_Str(8, 23, YEL, PRN, "LIB ver 3.13");
//WaitForKey();
// check for presence of APP and jump to start
pApp = (APP_Interface *)*(u32 *)(APP_VECTORS + 7 * 4);
if (pApp->Signature == APP_SIGNATURE)
pApp->APP_Start();
Display_Str(150, 23, RED, PRN, "No APP found");
while (1);
}
示例9: main
/**
* @brief 串口打印输出
* @param None
* @retval None
*/
int main(void)
{
uint8_t data[64];
uint32_t i=0,ret=0;
Set_System();//系统时钟初始化
USART_Configuration();//串口1初始化
printf("\x0c\0");printf("\x0c\0");//超级终端清屏
printf("\033[1;40;32m");//设置超级终端背景为黑色,字符为绿色
printf("\r\n*******************************************************************************");
printf("\r\n************************ Copyright 2009-2012, ViewTool ************************");
printf("\r\n*************************** http://www.viewtool.com ***************************");
printf("\r\n***************************** All Rights Reserved *****************************");
printf("\r\n*******************************************************************************");
printf("\r\n");
USB_Interrupts_Config();
Set_USBClock();
USB_Init();
while(1)
{
if(USB_Received_Flag){
USB_Received_Flag=0;
ret = USB_GetData(data,sizeof(data));
printf("usb get data %d byte data\n\r",ret);
for(i=0;i<ret;i++){
printf("0x%02X ",data[i]);
}
printf("\n\r");
USB_SendData(data,sizeof(data));
}
}
}
示例10: main
/*******************************************************************************
* Function Name : main.
* Description : Main routine.
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
int main(void)
{
int i;
Reset_GC3355();
Set_System();
Set_USBClock();
USB_Interrupts_Config();
#ifdef USE_USB_AS_HOST_IF
USB_Init();
#endif
USART_Config_Default();
btc_ltc_uart_config(115200);
delay_init(72);
//gpio_init();
Timerx_Init(100,7200-1);
USART_Config_Default();
rx_cx_buffers_init();
while (1)
{
dispatch_host_cmd();
report_nonce_to_host();
if(timer_count > 100) {
timer_count = 0;
//PR_DEBUG("GPIOB8 = %d\n",GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_8));
led1_revert();
//PR_DEBUG("%02X\n",get_next_n_out(&usb_trans_buffer,152));
//PR_DEBUG("has cmd length = %d\n",trans_buffer_has_cmd(&usb_trans_buffer));
}
//delay_ms(1000);
//PR_DEBUG("delay 1000ms \n");
}
}
示例11: main
/*******************************************************************************
* Function Name : main.
* Description : main routine.
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
int main(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
NAND_IDTypeDef NAND_Id;
NAND_ADDRESS NAND_Address;
int i=0;
#ifdef DEBUG
debug();
#endif
Set_System();
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);
Serial_Init();
NAND_Init();
NAND_Reset();
NAND_ReadID(&NAND_Id);
Get_Medium_Characteristics();
Set_USBClock();
USB_Interrupts_Config();
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
GPIO_Init(GPIOC, &GPIO_InitStructure);
USB_Init();
while (1)
{
}
}
示例12: main
int main(void)
{
volatile float fnk1,fnk2,fnk3=0;
int i;
Set_System();
SysTickInit(INTERVAL);
conio_init(UART_DEFAULT_NUM,UART_BAUDLATE);
printf("\n");
printf("Welcome to %s test program !!\n",MPU_SUBMODEL);
printf("Version %s!!\n",APP_VERSION);
printf("Build Date : %s\n",__DATE__);
fnk1 = 14.0;
fnk2 = 9.0;
fnk3 = fnk1/fnk2;
printf("Floating point calculation: %f/%f=%f\n",fnk1,fnk2,fnk3);
printf("\n");
fnk1 = 0.0;
for (i = 1;i < 50000000;i += 4) {
fnk1 += 4.0f / (float)(i) - 4.0f / (float)(i + 2);
}
printf("pi: %f\n",fnk1);
printf("\n");
/* Main Loop */
while (1)
{
_delay_ms(100);
_delay_ms(100);
}
}
示例13: main
int main()
{
InitGPIO();
//InitTIM3();
//InitTIM4();
InitIWDG(); // Init Watch Dog
InitBKP();
#ifdef DEBUG_OUTPUT_USB
Set_System();
Set_USBClock();
USB_Interrupts_Config();
USB_Init();
#else
rtc_init();
#endif
RTC_t date;
date.year = 2015;
date.month = 10;
date.mday = 24;
date.hour = 23;
date.min = 20;
date.sec = 0;
rtc_settime(&date);
// Start Task //
xTaskCreate(vLcdPcf, "vLcdPcf", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY + 1, &xHandlevLcdPcfTask);
xTaskCreate(vDebugTask, "vDebugTask", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY + 1, &xHandleDebugTask);
// Start scheduler //
osKernelStart(NULL, NULL);
}
示例14: main
/*******************************************************************************
* Function Name : main.
* Description : main routine.
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
int main(void)
{
DFU_Button_Config();
/* Check if the Key push-button on STM3210x-EVAL Board is pressed */
if (DFU_Button_Read())
{ /* Test if user code is programmed starting from address 0x8003000 */
if (((*(__IO uint32_t*)ApplicationAddress) & 0x2FFE0000 ) == 0x20000000)
{ /* Jump to user application */
JumpAddress = *(__IO uint32_t*) (ApplicationAddress + 4);
Jump_To_Application = (pFunction) JumpAddress;
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t*) ApplicationAddress);
Jump_To_Application();
}
} /* Otherwise enters DFU mode to allow user to program his application */
/* Enter DFU mode */
DeviceState = STATE_dfuERROR;
DeviceStatus[0] = STATUS_ERRFIRMWARE;
DeviceStatus[4] = DeviceState;
Set_System();
Set_USBClock();
USB_Init();
/* turn on LED */
GPIOB->BSRR = GPIO_Pin_5;
/* Main loop */
while (1)
{}
}
示例15: main
int main(void)
{
/* Set Basis System(includes SYSTICK Setings) */
Set_System();
/* Set UART and redirect to stdio */
conio_init(UART_DEFAULT_NUM,UART_BAUDRATE);
BSP_LED_Init(LED_GREEN);
int i = 0;
for(;;)
{
BSP_LED_Toggle(LED_GREEN);
for (int j = 0; j < 1000000; j++)
;
printf("Hello, world! -- %i\n", i++);
}
return 0;
}