Subversion Repositories DashDisplay

Rev

Rev 32 | Rev 36 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32 Rev 35
Line 483... Line 483...
483
                                        uint8_t inst = Data.Sensor[i].Instance;
483
                                        uint8_t inst = Data.Sensor[i].Instance;
484
                                        uint16_t reading = ConvPLX(Data.Sensor[i].ReadingH,
484
                                        uint16_t reading = ConvPLX(Data.Sensor[i].ReadingH,
485
                                                        Data.Sensor[i].ReadingL);
485
                                                        Data.Sensor[i].ReadingL);
486
 
486
 
487
                                        char outbuff[100];
487
                                        char outbuff[100];
488
                                        int cnt = small_sprintf(outbuff, "%d,%d,%d\n", addr, inst,
488
                                        int cnt = small_sprintf(outbuff, "%d,%d,%d\r\n", addr, inst,
489
                                                        reading);
489
                                                        reading);
490
                                        int i;
490
                                        int i;
491
                                        for (i = 0; i < cnt; i++)
491
                                        for (i = 0; i < cnt; i++)
492
 
492
 
493
                                        {
493
                                        {
Line 543... Line 543...
543
 
543
 
544
  __HAL_RCC_PWR_CLK_ENABLE();
544
  __HAL_RCC_PWR_CLK_ENABLE();
545
 
545
 
546
  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
546
  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
547
 
547
 
548
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
548
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
549
  RCC_OscInitStruct.HSEState = RCC_HSE_ON;
549
  RCC_OscInitStruct.HSIState = RCC_HSI_ON;
-
 
550
  RCC_OscInitStruct.HSICalibrationValue = 16;
550
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
551
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
551
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
552
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
552
  RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
553
  RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
553
  RCC_OscInitStruct.PLL.PLLDIV = RCC_PLL_DIV3;
554
  RCC_OscInitStruct.PLL.PLLDIV = RCC_PLL_DIV3;
554
  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
555
  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
555
  {
556
  {
556
    Error_Handler();
557
    Error_Handler();
557
  }
558
  }