• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LCD_PrintString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: main

/*******************************************************************************
* Function Name: main
********************************************************************************
*
* Summary:
*  Main function performs following functions:
*   1. Initialises the DMA to move data from ADC_SAR_1 work registers to the
*      PrISM pulse density registers.
*   2. Initialises the ISR connected to the DMA nrq terminal(DMA done).
*   3. Initialises the LCD.
*   4. Initialises the PrISM with 1Mhz clock.
*   5. Initialises the two SAR ADCs.
*   6. Displays the results of ADC_SAR_1 when DmaDone ISR rises.
*      The results are read from PrISM pulse density register.
*   7. Displays the results of ADC_SAR_2 when internal EOC ISR rises.
*
* Parameters:
*  None.
*
* Return:
*  None.
*
*******************************************************************************/
int main()
{
    char8 resultStr[16u];
    float res;


    /* Initializes the LCD. */
    LCD_Start();
    LCD_Position(1u,0u);
    LCD_PrintString("ADC2=      V");

    ADC_SAR_2_Start();
    ADC_SAR_2_IRQ_StartEx(ADC_SAR_2_ISR_LOC);
    ADC_SAR_2_StartConvert();

    CyGlobalIntEnable;

    for(;;)
    {

        /* Show ADC2 result on LCD*/
        if(dataReady != 0u)
        {
            res = ADC_SAR_2_CountsTo_Volts(result);
            sprintf((char *)resultStr,"%+1.2f",res);
            LCD_Position(1u,5u);
            LCD_PrintString(resultStr);
            dataReady = 0u;
        }
    }
}
开发者ID:bill-he,项目名称:jackbill350,代码行数:54,代码来源:main.c


示例2: DisplayChoices

signed char DisplayChoices(const char *Menu[], char ItemCount, const char *Prompt, char Initial) {
    char SelectedItem = 0;
    signed char ret = 0;
    SelectedItem = Initial;
    while (1) {
        LCD_ClearDisplay();
        LCD_PrintString(Prompt);
        LCD_SetPosition(1, 0);
        LCD_PrintChar('*');
        LCD_PrintString(Menu[SelectedItem]);

        ret = GetInput();
        if (ret < 0) return ret;

        switch (ret) {
            case USER_INPUT_CLICK:
                return (SelectedItem);
            case USER_INPUT_BACK:
                return (-1);
            case USER_INPUT_CANCEL:
                return (-2);
            case USER_INPUT_INC:
                if (SelectedItem == ItemCount) SelectedItem = ItemCount;
                else SelectedItem++;
                break;
            case USER_INPUT_DEC:
                if (SelectedItem == 0) SelectedItem = 0;
                else SelectedItem--;
                break;
        }
    }
    return (0);
}
开发者ID:Demolitron,项目名称:CineFluxOrbitFirmware,代码行数:33,代码来源:UserInterface.c


示例3: main

int main(void)
{

  /* USER CODE BEGIN 1 */
	uint8_t damogranlabs_logo[]={
		0x0F,
		0x13,
		0x11,
		0x11,
		0x0e,
		0x00,
		0x00		
	};
  /* USER CODE END 1 */

  /* MCU Configuration----------------------------------------------------------*/

  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* Configure the system clock */
  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_USART1_UART_Init();

  /* USER CODE BEGIN 2 */
	LCD_Init(2, 20);
	LCD_CreateChar(0, damogranlabs_logo); 
	
  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
	LCD_PrintString(2, 1, "n: ");
	LCD_PrintNumber(2, 4, -10);
	
	LCD_PrintString(2, 10, "f: ");
	LCD_PrintFloat(2, 13, -326.5635, 5);
	
	while (1)
  {
		LCD_PrintStringWindow(1, 3, 14, 350, "Find us on github and www.damogranlabs.com");
		LCD_Clear();
		LCD_PrintString(1, 1, "www.damogranlabs.com");
		LCD_PutCustom(2, 10, 0);
		LCD_ClearArea(1, 5, 12); 
		HAL_GPIO_TogglePin(LD3_GPIO_Port, LD3_Pin);
		HAL_Delay(2000);
		
		
		
				/* USER CODE END WHILE */

		/* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */

}
开发者ID:damogranlabs,项目名称:STM32L1,代码行数:60,代码来源:main.c


示例4: GetYesNo

signed char GetYesNo(const char *prompt, signed char Initial) {
    signed char answer;
    signed char inp;
    LCD_ClearDisplay();
    LCD_PrintString(prompt);

    answer = Initial;
    while (1) {
        LCD_SetPosition(1, 0);
        if (answer) LCD_PrintString("<YES>\0");
        else LCD_PrintString("<NO> \0");
        inp = GetInput();
        if (inp < 0) return inp;

        switch (inp) {
            case USER_INPUT_CLICK: //The User Pressed the button to select something...
                return (answer);
                
            case USER_INPUT_CANCEL:
                return -2;
                
            case USER_INPUT_BACK:
                return -1;
                
            case USER_INPUT_INC: //Rot +
            case USER_INPUT_DEC: //Rot -
                answer = !answer;
                break;
            default:
                break;
        }
    }
    return (0);
}
开发者ID:Demolitron,项目名称:CineFluxOrbitFirmware,代码行数:34,代码来源:UserInterface.c


示例5: main

int main(void)
{

  /* USER CODE BEGIN 1 */

  /* USER CODE END 1 */

  /* MCU Configuration----------------------------------------------------------*/

  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* Configure the system clock */
  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_USART1_UART_Init();

  /* USER CODE BEGIN 2 */
	LCD_Init(2, 20);
	LCD_PrintString(0, 0, "Damogran Labs");
	
	Encoder_Init(&encoder1, ENC1_A_GPIO_Port, ENC1_A_Pin, ENC1_B_GPIO_Port, ENC1_B_Pin);
	Encoder_Init(&encoder2, ENC2_A_GPIO_Port, ENC2_A_Pin, ENC2_B_GPIO_Port, ENC2_B_Pin);
		
  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
	LCD_PrintNumber(1, 0, encoder1.abs_rot);
	LCD_PrintNumber(1, 6, encoder2.abs_rot);
	
  while (1)
  {
		if(Encoder_GetState(&encoder1)){
			LCD_PrintString(1, 0, "     ");
			LCD_PrintNumber(1, 0, encoder1.abs_rot);
		}	
		if(Encoder_GetState(&encoder2)){
			LCD_PrintString(1, 6, "     ");
			LCD_PrintNumber(1, 6, encoder2.abs_rot);
		}	
		
		if(HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0) == GPIO_PIN_SET){
			Encoder_SetAbsToZero(&encoder1);
			Encoder_SetAbsToZero(&encoder2);
		}
		
		HAL_Delay(100);
  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

  }
  /* USER CODE END 3 */

}
开发者ID:damogranlabs,项目名称:STM32L1,代码行数:58,代码来源:main.c


示例6: TestADCCalibration

//main routine for ADC (linear) calibration testing
void TestADCCalibration(void)
{
  unsigned int * ADCBuffer;
  double * ADCRealValues;
  double P, Q;
  unsigned int i;
  unsigned int NumOfData;
  volatile double diffOrig;
  volatile double diffCalib;
  unsigned char DEBUG_STRING[30];

  //set external clock (16MHz XTALL required)
  SetCPUClock(0);

  //allocate buffer space
  if ((ADCBuffer = malloc(ADC_BUFFER_SIZE * sizeof(ADCBuffer[0]))) == NULL)
    _asm("trap\n");
  if ((ADCRealValues = malloc(ADC_BUFFER_SIZE * sizeof(ADCRealValues[0]))) == NULL)
    _asm("trap\n");

  //main test
  {
    //collect data
    NumOfData = ADCCollectDataCalib(ADCBuffer, ADCRealValues);
    P= GetMultiplierCalib(ADCBuffer, ADCRealValues, NumOfData);
    diffOrig = GetErrorCalib(ADCBuffer, ADCRealValues, NumOfData, P, 0);

    //calib data
    ADCCalibratePQ(ADCBuffer, ADCRealValues, NumOfData, &P, &Q);
    diffCalib = GetErrorCalib(ADCBuffer, ADCRealValues, NumOfData, P, Q);

    //print errors
    sprintf(DEBUG_STRING, "Orig = %f", diffOrig);
    LCD_PrintString(LCD_LINE1, ENABLE, DISABLE, DEBUG_STRING);
    sprintf(DEBUG_STRING, "Calib= %f", diffCalib);
    LCD_PrintString(LCD_LINE2, ENABLE, DISABLE, DEBUG_STRING);
    delay(500000l);//to show results
  }
  
  //see real values after ADC calibration - for checking calibration
  LCD_Clear();
  LCD_PrintString(LCD_LINE1, DISABLE, ENABLE, "Real calibrated U");  
  while(!JOY_SEL)
  {
    //start single conversion
    ADC2_StartConversion();
    while (!ADC2_GetFlagStatus());
    //clear end of conversion bit
    ADC2_ClearFlag();
    //collect ADC value and display
    LCD_SetCursorPos(LCD_LINE2, 4);//set cursor position
    LCD_PrintDec4((P*ADC2_GetConversionValue() + Q)*1000);
  }
  
  //unallocate buffer
  free(ADCBuffer);
}//TestADCCalibration
开发者ID:Amirelecom,项目名称:brush-v1,代码行数:58,代码来源:ADCCalibration.c


示例7: printDebug

void printDebug(STATE state){
  LCD_MoveCursor(1,1);
  char stringToPrint[16];
  sprintf(stringToPrint,"%4d%4d%4d%4d",IRSensor_GetLeftFront(), IRSensor_GetCenterLeft(), IRSensor_GetCenterRight(), IRSensor_GetRightFront());
  LCD_PrintString(stringToPrint);
  LCD_MoveCursor(1,2);
  sprintf(stringToPrint,"OC:%5d:%5d %1d",OC2RS,OC4RS,state);
  LCD_PrintString(stringToPrint);
};
开发者ID:mpharmon,项目名称:ECE372a-Final-Project-Part-1,代码行数:9,代码来源:main.c


示例8: GetFloat

signed char GetFloat(const char *prompt, const char *unit, double* Value, double Min, double Max, double Precision) {
    double Output;
    char WholePlaces;
    char FractionalPlaces;
    signed char ret = 0;


    if ((Max >= 10000) || (Min <= -10000)) WholePlaces = 5;
    else if (Max >= 1000 | Min <= -1000) WholePlaces = 4;
    else if (Max >= 100 | Min <= -100) WholePlaces = 3;
    else if (Max >= 10 | Min <= -10) WholePlaces = 2;
    else WholePlaces = 2;

    if (Precision >= 1.0) FractionalPlaces = 0;
    else if (Precision >= 0.1) FractionalPlaces = 1;
    else if (Precision >= 0.01) FractionalPlaces = 2;
    else if (Precision >= 0.001) FractionalPlaces = 3;
    else if (Precision >= 0.0001) FractionalPlaces = 4;


    Output = *Value;
    LCD_ClearDisplay();
    LCD_PrintString(prompt);

    LCD_SetPosition(1, 0);
    LCD_PrintFloat(Output, WholePlaces, FractionalPlaces, 1);
    LCD_PrintString(unit);

    while (1) {
        LCD_SetPosition(1, 0);
        LCD_PrintFloat(Output, WholePlaces, FractionalPlaces, 1);
        ret = GetInput();
        if (ret < 0) return ret;
        switch (ret) {
            case USER_INPUT_CLICK: //user has pressed the switch to accept.                     
                *Value = Output;
                return (0);
            case USER_INPUT_CANCEL:
                return -2;
                
            case USER_INPUT_BACK:
                return -1;
                
            case USER_INPUT_INC: //Rot+
                Output += GetRotaryMultiplier() * Precision;
                if (Output > Max) Output = Max;
                break;
            case USER_INPUT_DEC:
                Output -= GetRotaryMultiplier() * Precision;
                if (Output < Min) Output = Min;
                break;
        }
    }
    return (0);
}
开发者ID:Demolitron,项目名称:CineFluxOrbitFirmware,代码行数:55,代码来源:UserInterface.c


示例9: Detect_heartrate

/************************************************
 * Method to calculate the heartrate based on 
 * the start and end values of a counter that
 * is driven by interrupts which are driven by
 * the heartbeat.
 * @return heartrate The last recorded heartrate
 ************************************************/
float Detect_heartrate(void) {
    LCD_Position(0,0);
    LCD_PrintString("Heartrate: ");
    LCD_PrintString("      ");
    LCD_Position(1,0);
    /* 600000 because the clock speed of the 
     heartrate is set to kHz */
    heartrate = (600000/(endCounts-startCounts));
    LCD_PrintU32Number(heartrate);
    LCD_PrintString("      ");
    return heartrate;
}
开发者ID:ponioj,项目名称:embedded,代码行数:19,代码来源:heartrate.c


示例10: assert_failed

/**
  * @brief  Reports the name of the source file and the source line number
  *   where the assert_param error has occurred.
  * @param  file: pointer to the source file name
  * @param  line: assert_param error line source number
  * @retval None
  */
void assert_failed(uint8_t* file, uint32_t line)
{
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  /* Infinite loop */
  while (1)
  {
    LCD_PrintString(LCD_LINE1, DISABLE, DISABLE, "      ERR       ");
    LCD_PrintString(LCD_LINE2, DISABLE, DISABLE, "     ASSERT     ");
  }
}
开发者ID:HorseMa,项目名称:contiki,代码行数:19,代码来源:main.c


示例11: ShowVoltage

signed char ShowVoltage() {    
    double Batt;
    LCD_ClearDisplay();
    bLock_BatteryVoltage = 1;
    Batt = BatteryVoltage;
    bLock_BatteryVoltage = 0;
    Batt *= Config.Volts_per_Count;
    LCD_PrintString("BATTERY VOLTAGE:\0");
    LCD_SetPosition(1, 0);
    LCD_PrintFloat(Batt, 2, 2, 0);
    LCD_PrintString(" VOLTS\0");
    return GetClick();
}
开发者ID:Demolitron,项目名称:CineFluxOrbitFirmware,代码行数:13,代码来源:UserInterface.c


示例12: GetPresetNumber

signed char GetPresetNumber() {
    signed char inp;
    char pnum;
    signed char ptype;
    LCD_ClearDisplay();
    LCD_PrintString("PRESET SLOT:\0");
    LCD_SetPosition(1, 0);
    LCD_PrintString("PRESET 01\0");
    pnum = 1;

    while (1) {
        LCD_SetPosition(1, 7);
        LCD_PrintLong((int) pnum, 2, 0);

        ptype = GetPresetType(pnum);

        switch (ptype) {
            case 0:
                LCD_PrintString("-EMPTY    \0");
                break;
            case 1:
                LCD_PrintString("-WAYPOINT \0");
                break;
            case 2:
                LCD_PrintString("-ORBIT    \0");
                break;
        }

        inp = GetInput();
        if (inp<0) return inp;
        
        switch (inp) {
            case USER_INPUT_DEC:
                if (pnum > 1) pnum--;
                break;
            case USER_INPUT_INC:
                if (pnum < 5) pnum++;
                break;
            case USER_INPUT_CLICK:
                return (pnum);
            case USER_INPUT_BACK:
                return (-1);
            case USER_INPUT_CANCEL:
                return (-2);
        }
    }
    return (-2);
}
开发者ID:Demolitron,项目名称:CineFluxOrbitFirmware,代码行数:48,代码来源:UserInterface.c


示例13: main

/*******************************************************************************
* Function Name: main
********************************************************************************
*
* Summary:
*  main() performs following functions:
*  1: Initializes the LCD
*  2: Starts ADC
*  3: Starts ADC converstion.
*  4: Gets the converted result and displays it in LCD.
*
* Parameters:
*  None.
*
* Return:
*  None.
*
*******************************************************************************/
int main()
{
    int16 output;

    /* Start the components */

    LCD_Start();
    ADC_DelSig_1_Start();

    /* Start the ADC conversion */
    ADC_DelSig_1_StartConvert();

    /* Display the value of ADC output on LCD */
    LCD_Position(0u, 0u);
    LCD_PrintString("ADC_Output");

    for(;;)
    {
        if(ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_RETURN_STATUS))
        {
            output = ADC_DelSig_1_GetResult16();
            
            /* Saturate ADC result to positive numbers. */
            if(output < 0)
            {
                output = 0;
            }
            LCD_Position(1u, 0u);
            LCD_PrintInt16(output);
        }
    }
}
开发者ID:bill-he,项目名称:jackbill350,代码行数:50,代码来源:main.c


示例14: UserInput

//////////////////////////////////////////////////////
//	This function display current input from user
//////////////////////////////////////////////////////
void UserInput(void)
{
	//Write_Lcd(0x0D, 0);
	char_menu_pw[current_pw_digit] = digit;
	char_menu_pw[current_pw_digit+1] = 0;
	LCD_PrintString(char_menu_pw, LCD_ROW1, 1);
}
开发者ID:chenlongchoo,项目名称:EM6300,代码行数:10,代码来源:menu.c


示例15: DisplayLastSkierTime

/*******************************************************************************
* Function name: DisplayPrintLastTimeSkier
********************************************************************************
*
* Summary:
*   print time last skier from position row = 1, column = 0
*
*******************************************************************************/
void DisplayLastSkierTime(uint32_t sec, uint16_t milisec)
{
    /*printf time in format mm:ss:msmsms*/
    sprintf(buff, "Result %02u:%02u:%03u",sec/60,sec%60, milisec);
    LCD_Position(0,0);
    LCD_PrintString(buff);
}
开发者ID:andrey-mcs,项目名称:start-finish-system,代码行数:15,代码来源:display.c


示例16: kb_draw_key

static void kb_draw_key(struct guiBox *box, char c, u8 pressed)
{
    u16 w, h;
    u16 bg_color;
    u16 fg_color;
    char ch[2];
    const char *str = "";
    if ( c == '\x06') { //DONE
        str = "DONE";
        if (pressed) {
            bg_color = Display.keyboard.fg_key3;
            fg_color = Display.keyboard.bg_key3;
        } else {
            bg_color = Display.keyboard.bg_key3;
            fg_color = Display.keyboard.fg_key3;
        }
    } else if (c < ' ') { //CAPS, DEL, NUMPAD
        if      (c == '\x09') str = caps_str;
        else if (c == '\x08') str = del_str;
        else if (c == '\x01') str = mix_str;
        else if (c == '\x02') str = char_str;

        if (pressed) {
            bg_color = Display.keyboard.fg_key2;
            fg_color = Display.keyboard.bg_key2;
        } else {
            bg_color = Display.keyboard.bg_key2;
            fg_color = Display.keyboard.fg_key2;
        }
    } else {
        if (c == ' ') {
            str = space_str;
        } else {
            ch[0] = c;
            ch[1] = 0;
            str = ch;
        }
        if (pressed) {
            bg_color = Display.keyboard.fg_key1;
            fg_color = Display.keyboard.bg_key1;
        } else {
            bg_color = Display.keyboard.bg_key1;
            fg_color = Display.keyboard.fg_key1;
        }
    }
    /*
    printf("(%dx%dx%dx%d)", box->x, box->y, box->width, box->height);
    if(coords1)
        printf(" coords1: %dx%d", coords1->x, coords1->y);
    if(coords2)
        printf(" coords2: %dx%d", coords2->x, coords2->y);
    printf(" Draw: %d\n", draw);
    */
    LCD_SetFont(Display.keyboard.font);
    _draw_key_bg(box, pressed, bg_color);
    LCD_GetStringDimensions((const u8 *)str, &w, &h);
    LCD_SetXY(box->x + (box->width - w) / 2, box->y + (box->height - h) / 2);
    LCD_SetFontColor(fg_color);
    LCD_PrintString((const char *)str);
}
开发者ID:Arakon,项目名称:deviation,代码行数:60,代码来源:keyboard.c


示例17: main

int main(void)
{    
    CyGlobalIntEnable; /* Enable global interrupts. */
    
    DisplayStart();
    Display("System init...");
    
    RTC_WDT_Init(); 
    InitNetwork();
    
    
    
    Display("Sync time...");

    uint8_t number = 0;
    while((result = NTPsync()) != TIME_SYNC_OK)
    {
        char buf[10];
        sprintf(buf, "Sync time -%d", number++);
        LCD_Position(0,0);
        LCD_PrintString(buf);
        CyDelay(500);
    }
    
    Display("Sync ok        ");
    CyDelay(4*TIMEOUT_USER_READ_INFO);
    
    for(;;)
    {
        DisplayRealTime();
        CyDelay(500);
    }
}
开发者ID:andrey-mcs,项目名称:start-finish-system,代码行数:33,代码来源:main.c


示例18: main_play_ttc

void main_play_ttc(){
    LCD_Start();					    // initialize lcd
    LCD_ClearDisplay();
    UART_Start();                       // initialize UART
    UART_PutChar(0x81); // init connection; set to 16x12 image 
    
    struct disp_grid_81 disp; 
    disp_grid_init(&disp,0x3F); // init our display grid matrix to white  
    disp_grid_transmit(&disp);
    
    struct tic_tac_toe lolz;
 	ttc_init(&lolz,4,3);    
    disp_grid_init_ttc(&disp,lolz.grid); // init the board
    disp_grid_draw_xia(&disp,26,16,0x30); // draw xia
    disp_grid_transmit(&disp);
    
    int x,y,z; int Values;
    
    while (lolz.game_not_won == 0){
        //Values = read_from_8255(Values);
        Values = Pin3_Read();
        if (Values >= 0 && Values <= 63){ //integer value
            z = Values / 16;
            x = Values % 4; //get row value
            y = Values / 4 - z*4; // 
            LCD_ClearDisplay();
            LCD_PrintNumber(Values);
            LCD_PrintString(" x");
            LCD_PrintNumber(x);
            LCD_PrintString(" y");
            LCD_PrintNumber(y);
            LCD_PrintString(" z");
            LCD_PrintNumber(z);
        }
        if (ttc_get_grid(&lolz,x,y,z) == 0){ // has not been accessed
            ttc_step(&disp,&lolz,x,y,z); // step & print
            disp_grid_transmit(&disp);
        }
        
    }
    LCD_ClearDisplay();
    LCD_Position(0,0); //move to bot row
    LCD_PrintString("GAME OVER!");    
    
}
开发者ID:qandrew,项目名称:6.115-final-project,代码行数:45,代码来源:main.c


示例19: DisplayRealTime

/*******************************************************************************
* Function name: DisplayPrintfRealTime
********************************************************************************
*
* Summary:
*   print real time from position row = 1, column = 0
*
*******************************************************************************/
void DisplayRealTime(void)
{
    uint32_t time;
    
    time = RTC_GetTime();
    sprintf(buff, "%02lu:%02lu:%02lu      ", RTC_GetHours(time),RTC_GetMinutes(time), RTC_GetSecond(time));
    LCD_Position(1,0);
    LCD_PrintString(buff);
}
开发者ID:andrey-mcs,项目名称:start-finish-system,代码行数:17,代码来源:display.c


示例20: gotoMenuResetState

void gotoMenuResetState(void)
{
	static unsigned int boardrequest = 12000;
	int i;
	char s[17] = "";
	// Sends a request to bottom board to get readings.
	// Any readings received will be processed in mcu.c.

	if( TickGet()-Timer > (5*TICK_SECOND) )
	{
		//s[0] = ph_4total;		// 2014-07-01 Liz removed
		s[0] = 0;				// 2014-07-01 Liz added
		s[1] = 10;
		s[2] = 'N'; //2012-09-24: Liz added to distinguish from EEPROM request.
		// Show on the LCD the reading that is in the local variable
		// while at the same time request for a new reading from the
		// bottom board.
		
		// 2012-05-10(Eric) - No need to retry here since it is not critical.
		// More impt to release control back to main loop.
		MCURequestToBOTTOMBoard(MMT_READING_REQUEST, s, 3, FALSE, FALSE);
		//MCURequestToBOTTOMBoard(MMT_READING_REQUEST, s, 2, FALSE, TRUE);

		// 2014-07-01 Liz removed
//		ph_4total++;
//		if( ph_4total >= 4)
//		{
//			ph_4total = 1;
//			//Convert3RealEnergyToCharArray(s);
//			Convert3RealEnergyToCharArray(s, 1, 1);
//		
//			LCD_PrintString(s, LCD_ROW1, 0);
//		}
		
		// 20114-07-01 Liz added
		Convert3RealEnergyToCharArray(s, 1, 1);
		LCD_PrintString(s, LCD_ROW1, 0);
		///////////////////////
		
		Timer = TickGet();
	}	
	
	switch (menu_control(reset_table, reset_table_max))
	{
		case -2:
			break;
		case 0:
			setMenuCurrentState(MENU_IDLE_STATE);
			set_current_menu(0);
			gotoMenuIdleState();
			LCD_PrintStringPGM("",LCD_ROW1);
			break;
		default:
			break;
	}
}
开发者ID:chenlongchoo,项目名称:EM6300,代码行数:56,代码来源:menu.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LCD_SetCursor函数代码示例发布时间:2022-05-30
下一篇:
C++ LCD_LOG_SetHeader函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap